Copyright: Copyright © 2007, Agilent Technologies
Citation: Agilent N6700 Instrument Drive Help


Agilent Technologies
Agilent Technologies N6700 Instrument Driver

©2004, 2007  Agilent Technologies

For more information on Agilent Technologies, access:

http://www.agilent.com

using your favorite web browser.


Agilent Technologies N6700 Instrument Driver Help Contents

Programming Information

Using the N6700 Instrument Driver

Introduction to Programming

Getting started with Agilent VEE

Getting started with LabVIEW

Getting Started with LabWindows

Programming the Output

Synchronizing Output Steps

Making Measurements

Programming Output Lists

Programming the Digitizer

Synchronizing Digitizer Measurements

Programming the Status Registers

Programming Digital I/O Functions

Example Programs

Example Programs

Reference Information

Function Reference (Alphabetical)

Function Reference (Hierarchical)

Equivalent SCPI Commands

Where to Find it

Online and User Manual Information

In Case of Trouble

Copyright Notice


Closing a Instrument Session
Closing an Instrument Session

Sessions (vi) opened with the agN67xx_init() function are closed with the function:

agN67xx_close( ViSession vi);

When no further communication with an instrument is required, the session must be explicitly closed (agN67xx_close() function). VISA does not remove sessions unless they are explicitly closed. Closing the instrument session frees all data structures and system resources allocated to that session.


Creating and Running Visual BASIC 4.0 Applications_1
Creating and Running Visual BASIC 4.0 Applications

Typically Visual Basic (VB) programs are created as event-driven applications. The code representing the main body of the program is stored in a .FRM file and executes when a VB form receives an event (i.e. a button click).  The example that follows is a step-by-step list of instructions on how to create a program using Microsoft Visual Basic Version 6.0.  The name of the program is Project1.  When the user clicks the Run button the program opens a GPIB connection to the instrument, queries the instruments ID string, prints the string, closes the GPIB connection and terminates.  It is assumed that the VISA I/O configuration has already been successfully completed.

See Also:

Visual BASIC Data Types

Visual BASIC Important Notes for Programmers

To create a new project:

Select File | New Project Workspace

Click OK

Add the agN67xx.bas file to the project::

Select File | Add File

Browse to and select the agN67xx.bas file

Click Open

Change the focus to Form1 and insert a button on the form:

Click on Form1

Click on the command button on the toolbox

With the mouse point over Form1 hold down the right mouse button a drag to create a rectangle where the button will be placed.

Release the right mouse button and a command button will be placed on Form1

Change the name on the button:

Click on the command button just created.

Change the focus to Properties-Form1, with Command1 CommandButton visible in the drop down list box

Edit the name of the caption to be Run

Press <Enter> to enter the change

Open the event handler for Command1

Change the focus to the project window

Highlight Form1

Click View Code

Select Command1 as the Object

Insert the following code between the Private Sub Command1_Click() and End Sub statements:

Dim lReturn As Long

Dim vi As Long

Dim szResponse As String *256

Dim lLength As Long

' open session, no verification, no reset

lReturn = agN67xx_init("GPIB::5::INSTR", VI_FALSE, VI_FALSE, vi)

If (lReturn <> VI_SUCCESS) Then

' connection failed

Print "Connection Failed!"

Return

End If

' query instrument ID string

lLength = 256

lReturn = agN67xx_cmdString_Q(vi, "*IDN?", lLength, szResponse)

Print "The instrument is: ", szResponse

' close session

lReturn = agN67xx_close(vi)

Print "Program complete."

Save the project

Select File | Save Project

Navigate to the desire directory to save the project in.

Click Save to save the form.

Click Save to save the project.

Run the program:

Select Run | Start

Execute the command handler:

Click Run

The results will be printed on Form1.


Creating, Compiling and Linking 32-bit Programs Using Microsoft VC++ Version 6.0
Creating, Compiling and Linking 32-bit Programs Using Microsoft Visual C++ Version 6.0

The example that follows is a step-by-step list of instructions on how to create a 32-bit console application project using Microsoft Visual C++ Version 6.0.  Any project type such as a MFC application or windows application could be created if desired.  The name of the program is SimpleExample.  The example program opens a GPIB connection to the instrument, queries the instruments ID string, prints the string, closes the GPIB connection and terminates.  It is assumed that the VISA I/O configuration has already been successfully completed.

To create a new project:

Select File | New | Project Workspace

Click OK

Select the project type, for this example we will build a simple console applications, but any other project type could be used:

Select Console Application as the Type

Enter a name for the project, for example SimpleExample

Change the location the project will be created in if desired.

Click Create

Create the program source file:

Select File | New | Text File

Enter the following program into the text file window:

#include <stdio.h>

#include "agN67xx.h"

main()

{

ViStatus	vistatReturn;

ViSession   vi;

ViChar	viszResponse[256];

// open session, no verification, no reset

if ((vistatReturn = agN67xx_init("GPIB::5::INSTR",

VI_FALSE, VI_FALSE, &vi)) != VI_SUCCESS)

{

// connection failed

printf("Connection Failed!\n");

return vistatReturn;

}

// query instrument ID string

vistatReturn = agN67xx_cmdString_Q(vi,"*IDN?",

256,viszResponse);

printf("The instrument is: %s",viszResponse);

// close session

vistatReturn = agN67xx_close(vi);

printf("Program complete.\n");

return 0;

}

Save the file:

Select File | Save

Enter SimpleExample.cpp for the file name.

Click Save

Insert the source file into the project:

Select Insert | Files into Project...

Click on SimpleExample.cpp

Click Add

Set the include file search path:

Select Tools | Options...

Select the Directory tab

Select Show Directories for Include Files

Scroll through the Directory list looking for the directory that the agN67xx.h file is in

If the agN67xx.h path isn't already in the list add it to the bottom of the list

Click OK

Insert the agN67xx library into the project link libraries:

Select Build | Settings... | Link | General

Insert agN67xx.lib in object/libraries modules edit box.

Click OK

Set the library search path:

Select Tools | Options...

Select the Directory tab

Select Show Directories for Library Files

Scroll through the Directory list looking for the directory that the agN67xx.lib file is in

If the agN67xx.lib path isn't already in the list add it to the bottom of the list

Click OK

Compile the project:

Click Build | Build SimpleExample.exe

Run the program

Select Build | Debug | Go

You may want to put a break point on the last line of the program to pause the program while the output window is still visible.  Alternatively open a DOS command window, switch to the directory that contains the executable file (SimpleExample/Debug) and run the program from the command line.


Creating, Compiling and Linking 32-bit Programs Using the HP-UX ANSI C Compilier
Creating, Compiling and Linking 32-bit Programs Using the HP-UX ANSI C Compiler

The example that follows is a step-by-step list of instructions on how to create a application using the HP-UX ANSI C compiler.  This procedure is applicable when using HP-UX 10.01 and above.  The name of the program is SimpleExample.  The example program opens a GPIB connection to the instrument, queries the instruments ID string, prints the string, closes the GPIB connection and terminates.  It is assumed that the VISA I/O configuration has already been successfully completed.

To create an application:

Move to the directory where you wish to create the application.

Use your favorite text editor to create a SimpleExample.c file with the following content:

#include <stdio.h>

#include <agN67xx.h>

main()

{

ViStatus	vistatReturn;

ViSession   vi;

ViChar	viszResponse[256];

/* open session, no verification, no reset */

if ((vistatReturn = agN67xx_init("GPIB::5::INSTR",

VI_FALSE, VI_FALSE, &vi)) != VI_SUCCESS)

{

/* connection failed */

printf("Connection Failed!\n");

return vistatReturn;

}

/* query instrument ID string */

vistatReturn = agN67xx_cmdString_Q(vi,"*IDN?",

256,viszResponse);

printf("The instrument is: %s",viszResponse);

/* close session */

vistatReturn = agN67xx_close(vi);

printf("Program complete.\n");

return 0;

}

Compile the program using the command line:

cc -Aa -o SimpleExample SimpleExample.c /opt/vxipnp/hpux/agN67xx/agN67xx.sl

Execute the program:

SimpleExample<Enter>


Equivalent SCPI Commands

SCPI /Common Command 	   Plug & Play Function

IEEE 488.2 Common Commands

*CLS	agN67xx_cmd

*ESE <integer>	agN67xx_cmdInt

*ESE?	agN67xx_getEnableReg

*ESR?	agN67xx_stdEvent_Q

*IDN?	agN67xx_revision_query

*OPC	agN67xx_cmd

*OPC?	agN67xx_opc_Q

*OPT?	agN67xx_cmdInt16_Q

*RCL <integer>	agN67xx_recallState

*RDT?	agN67xx_cmd

*RST	agN67xx_reset

*SAV <integer>	agN67xx_saveState

*SRE <integer>	agN67xx_cmd

*SRE?	agN67xx_cmdInt16_Q

*STB?	agN67xx_readStatusByte_Q

*TRG	agN67xx_trg

*TST?	agN67xx_self_test

*WAI	agN67xx_cmd

CALibrate Subsystem

CALibrate:CURRent[:LEVel] <NRf>	agN67xx_cmd

CALibrate:CURRent:MEASure <NRf>	agN67xx_cmd

CALibrate:CURRent:PEAK	agN67xx_cmd

CALibrate:DATA <NRf>	agN67xx_cmd

CALibrate:DATE <SPD>	agN67xx_cmd

CALibrate:DATE?	agN67xx_cmdString_Q

CALibrate:DPRog	agN67xx_cmd

CALibrate:LEVel P1 | P2 	agN67xx_cmd

CALibrate:PASSword <NRf>	agN67xx_cmd

CALibrate:SAVE	agN67xx_cmd

CALibrate:STATe <Bool>[,<NRf>]	agN67xx_cmd

CALibrate:STATe?	agN67xx_cmdString_Q

CALibrate:VOLTage[:LEVel] <NRf>	agN67xx_cmd

CALibrate:VOLTage:CMRR	agN67xx_cmd

CALibrate:VOLTage:MEASure <NRf>	agN67xx_cmd

FETCh/MEASure Subsystem

FETCh[:SCALar]:CURRent[:DC]?	agN67xx_fetchCurr

FETCh[:SCALar]:VOLTage[:DC]?	agN67xx_fetchVolt

FETCh:ARRay:CURRent[:DC]?	agN67xx_fetchCurrArray

FETCh:ARRay:VOLTage[:DC]?	agN67xx_fetchVoltArray

MEASure[:SCALar]:CURRent[:DC]?	agN67xx_measureCurr

MEASure[:SCALar]:VOLTage[:DC]?	agN67xx_measureVolt

MEASure:ARRay:CURRent[:DC]?	agN67xx_measureCurrArray

MEASure:ARRay:VOLTage[:DC]?	agN67xx_measureVoltArray

MMEMory Subsystem

MMEMory:ATTRibute?	agN67xx_fileGetSize

MMEMory:DATA? 	agN67xx_fileReadFirst

agN67xx_fileReadNext

MMEMory:DELete 	agN67xx_fileDelete

MMEMory:EXPort:DLOG 	agN67xx_fileExportDlog

INITiate Subsystem

INITiate[:IMMediate]:ACQuire 	agN67xx_arm

INITiate[:IMMediate]:DLOG 	agN67xx_dlogInitiate

INITiate[:IMMediate]:TRANsient	agN67xx_arm

INITiate:CONTinuous:TRANsient <Bool>	agN67xx_arm

OUTPut Subsystem

OUTPut[:STATe] <Bool> [,NORelay]	agN67xx_setOutputState

OUTPut[:STATe]?	agN67xx_getOutputState

OUTPut[:STATe]:COUPling:DOFFset:MODe AUTO | MAN	agN67xx_setOutputCoupleDelayOffsetMode

OUTPut[:STATe]:COUPling:DOFFset:MODe?	agN67xx_getOutputCoupleDelayOffsetMode

OUTPut[:STATe]:DELay:FALL <NRf>	agN67xx_configureOffSequence

OUTPut[:STATe]:DELay:FALL?	agN67xx_configureOffSequence

OUTPut[:STATe]:DELay:RISE <NRf>	agN67xx_configureOnSequence

OUTPut[:STATe]:DELay:RISE?	agN67xx_configureOnSequence

OUTPut:INHibit:MODE LATC | LIVE | OFF	agN67xx_setOutputInhibitMode

OUTPut:INHibit:MODE?	agN67xx_getOutputInhibitMode

OUTPut:PON:STATe RST | RCL0	agN67xx_setPowerOnState

OUTPut:PON:STATe?	agN67xx_getPowerOnState

OUTPut:PROTection:CLEar	agN67xx_resetOutputProtection

OUTPut:PROTection:COUPle <Bool>	agN67xx_setProtectionCoupleFaults

OUTPut:PROTection:COUPle?	agN67xx_getProtectionCoupleFaults

OUTPut:PROTection:DELay <NRf+>	agN67xx_setProtection OCPDelay

OUTPut:PROTection:DELay?	agN67xx_getProtection OCPDelay

OUTPut:RELay:POLarity NORM | REV	agN67xx_setRelayPolarity

OUTPut:RELay:POLarity?	agN67xx_getRelayPolarity

SENSe Subsystem

SENSe:CURRent:CCOMpensation[:STATe] <Bool>	agN67xx_setCurrentCompensate

SENSe:CURRent:CCOMpensation[:STATe]?	agN67xx_getCurrentCompensate

SENSe:CURRent[:DC]:RANGe[:UPPer] <NRf+>	agN67xx_setCurrSenseRange

SENSe:CURRent[:DC]:RANGe[:UPPer]?	agN67xx_getCurrSenseRange

SENSe:FUNCtion VOLT | CURR	agN67xx_setAcqSenseFunc

SENSe:DLOG:FUNCtion:CURRent <Bool>	agN67xx_dlogConfigureFunction

SENSe:DLOG:FUNCtion:MINMax <Bool>	agN67xx_dlogConfigureFunctionMinMax

SENSe:DLOG:FUNCtion:VOLTage <Bool>	agN67xx_dlogConfigureFunction

SENSe:DLOG:OFFset <NR1>	agN67xx_dlogConfigureTriggerOffset

SENSe:DLOG:TIME <hh-mm-ss>	agN67xx_dlogConfigureTime

SENSe:DLOG:TINT <NR1>	agN67xx_dlogConfigureTime

SENSe:FUNCtion?	agN67xx_getAcqSenseFunc

SENSe:SWEep:OFFSet:POINts <NRf+>	agN67xx_setSweepParams

SENSe:SWEep:OFFSet:POINts?	agN67xx_getSweepParams

SENSe:SWEep:POINts <NRf+>	agN67xx_setSweepParams

SENSe:SWEep:POINts?	agN67xx_getSweepParams

SENSe:SWEep:TINTerval <NRf+>	agN67xx_setSweepParams

SENSe:SWEep:TINTerval?	agN67xx_getSweepParams

SENSe:VOLTage[:DC]:RANGe[:UPPer] <NRf+>	agN67xx_setVoltSenseRange

SENSe:VOLTage[:DC]:RANGe[:UPPer]?	agN67xx_getVoltSenseRange

SENSe:WINDow:TYPE HANN | RECT	agN67xx_setMeasurementWindow

SENSe:WINDow:TYPE?	agN67xx_getMeasurementWindow

SOURce Subsystem

[SOURce]:CURRent[:LEVel][:IMMediate][:AMPLitude] <NRf+>	agN67xx_setCurr

[SOURce]:CURRent[:LEVel][:IMMediate][:AMPLitude]?	agN67xx_getCurr

[SOURce]:CURRent[:LEVel]:TRIGgered[:AMPLitude] <NRf+>	agN67xx_setCurr

[SOURce]:CURRent[:LEVel]:TRIGgered[:AMPLitude]?	agN67xx_getCurr

[SOURce]:CURRent:MODE FIX | STEP | LIST	agN67xx_setTriggerMode

[SOURce]:CURRent:MODE?	agN67xx_getTriggerMode

[SOURce]:CURRent:PROTection:STATe <Bool>	agN67xx_setOcpParams

[SOURce]:CURRent:PROTection:STATe?	agN67xx_getOcpParams

[SOURce]:CURRent:RANGe <NRf+>	agN67xx_outputCurrentLimit

[SOURce]:CURRent:RANGe?	agN67xx_cmd

[SOURce]:DIGital:INPut:DATA?	agN67xx_getDigitalPort

[SOURce]:DIGital:OUTput:DATA <NRf>	agN67xx_setDigitalPort

[SOURce]:DIGital:OUTput:DATA?	agN67xx_cmd

[SOURce]:DIGital:PIN:FUNCtion DIO | DIN | TOUT | TIN | FAUL | INH	agN67xx_configureIOPort

[SOURce]:DIGital:PIN:FUNCtion?	agN67xx_configureIOPort

[SOURce]:DIGital:PIN:POLarity POS | NEG	agN67xx_configureIOPort

[SOURce]:DIGital:PIN:POLarity?	agN67xx_configureIOPort

[SOURce]:LIST:COUNt <NRf+> | INF	agN67xx_transientListConfigure

[SOURce]:LIST:COUNt?	agN67xx_transientListConfigure

[SOURce]:LIST:CURRent[:LEVel] <NRf> {,<NRf>}	agN67xx_transientListPoints

[SOURce]:LIST:CURRent[:LEVel]?	agN67xx_transientListPoints

[SOURce]:LIST:CURRent:POINts?	agN67xx_transientListPoints

[SOURce]:LIST:DWELl <NRf> {,<NRf>}	agN67xx_transientListPoints

[SOURce]:LIST:DWELl?	agN67xx_transientListPoints

[SOURce]:LIST:DWELl:POINts?	agN67xx_transientListPoints

[SOURce]:LIST:STEP  ONCE | AUTO	agN67xx_transientListConfigure

[SOURce]:LIST:STEP?	agN67xx_transientListConfigure

[SOURce]:LIST:TERMinate:LAST <NRf+> | INF	agN67xx_transientListConfigure

[SOURce]:LIST:TERMinate:LAST?	agN67xx_transientListConfigure

[SOURce]:LIST:TOUTput:BOSTep[:DATA] <Bool> {,<Bool>}	agN67xx_transientListTrigOutPoints

[SOURce]:LIST:TOUTput:BOSTep[:DATA]?	agN67xx_transientListTrigOutPoints

[SOURce]:LIST:TOUTput:EOSTep[:DATA] <Bool> {,<Bool>}	agN67xx_transientListTrigOutPoints

[SOURce]:LIST:TOUTput:EOSTep[:DATA]?	agN67xx_transientListTrigOutPoints

[SOURce]:LIST:VOLTage[:LEVel] <NRf> {,<NRf>}	agN67xx_transientListPoints

[SOURce]:LIST:VOLTage[:LEVel]?	agN67xx_transientListPoints

[SOURce]:LIST:VOLTage:POINts?	agN67xx_transientListPoints

[SOURce]:POWer:LIMit <NRf+>	agN67xx_setPowerLimit

agN67xx_setPowerLimitMax

[SOURce]:POWer:LIMit?	agN67xx_getPowerLimit

agN67xx_getPowerLimitMax

[SOURce]:STEP:TOUTput <Bool>	agN67xx_setTransientStepTrigOut

[SOURce]:STEP:TOUTput?	agN67xx_getTransientStepTrigOut

[SOURce]:VOLTage[:LEVel][:IMMediate][:AMPLitude] <NRf+>	agN67xx_setVolt

[SOURce]:VOLTage[:LEVel][:IMMediate][:AMPLitude]?	agN67xx_getVolt

[SOURce]:VOLTage[:LEVel]:TRIGgered[:AMPLitude] <NRf+>	agN67xx_setVolt

[SOURce]:VOLTage[:LEVel]:TRIGgered[:AMPLitude]?	agN67xx_getVolt

[SOURce]:VOLTage:MODE FIX | STEP | LIST	agN67xx_setTriggerMode

[SOURce]:VOLTage:MODE?	agN67xx_getTriggerMode

[SOURce]:VOLTage:PROTection[:LEVel] <NRf+>	agN67xx_setProtectionOVPLimit

[SOURce]:VOLTage:PROTection[:LEVel]?	agN67xx_getProtectionOVPLimit

[SOURce]:VOLTage:RANGe <NRf+>	agN67xx_outputVoltageLevel

[SOURce]:VOLTage:RANGe?	agN67xx_cmd

[SOURce]:VOLTage:SENSe:SOURce INT | EXT	agN67xx_setFourWireSense

[SOURce]:VOLTage:SENSe:SOURce?	agN67xx_getFourWireSense

[SOURce]:VOLTage:SLEW <NRf+>	agN67xx_setVoltageSlewRate

[SOURce]:VOLTage:SLEW?	agN67xx_getVoltageSlewRate

STATus Subsystem

STATus:PRESet	agN67xx_statusPreset

STATus:OPERtion[:EVENt]?	agN67xx_operEvent_Q

STATus:OPERation:CONDition?	agN67xx_operCond_Q

STATus:OPERation:ENABle <NRf>	agN67xx_setEnableReg

STATus:OPERation:ENABle?	agN67xx_getEnableReg

STATus:OPERtion:NTRansition <NRf>	agN67xx_cmd

STATus:OPERtion:NTRansition?	agN67xx_cmdInt16_Q

STATus:OPERtion:PTRansition <NRf>	agN67xx_cmd

STATus:OPERtion:PTRansition?	agN67xx_cmdInt16_Q

STATus:QUEStionable[:EVENt]?	agN67xx_quesEvent_Q

STATus:QUEStionable:CONDition?	agN67xx_quesCond_Q

STATus:QUEStionable:ENABle <NRf>	agN67xx_setEnableReg

STATus:QUEStionable:ENABle?	agN67xx_getEnableReg

STATus:QUEStionable:NTRansition <NRf>	agN67xx_cmd

STATus:QUEStionable:NTRansition?	agN67xx_cmdInt16_Q

STATus:QUEStionable:PTRansition <NRf>	agN67xx_cmd

STATus:QUEStionable:PTRansition?	agN67xx_cmdInt16_Q

SYSTem Subsystem

SYSTem:CHANnel[:COUNt]?	agN67xx_getChannels

SYSTem:CHANnel:MODel?	agN67xx_getSystemModuleName

SYSTem:CHANnel:OPTion?	agN67xx_getSystemModuleOption

SYSTem:CHANnel:SERial?	agN67xx_getSystemModuleSerialNumber

SYSTem:COMMunicate:RLState LOC | REM | RWL	agN67xx_enableLocalControls

agN67xx_disableLocalControls

SYSTem:DATE <yy>, <mm>, <dd>	agN67xx_setDate

SYSTem:DATE?	agN67xx_getDate

SYSTem:CHANnel:MODel?	agN67xx_getSystemModuleName

SYSTem:GROup:CATalog?	agN67xx_getOutputGroup

SYSTem:GROup:DEFine	agN67xx_setOutputGroupy

SYSTem:GROup:DELete:ALL	agN67xx_setOutputGroup

SYSTem:TIME <yy>, <mm>, <dd>	agN67xx_setTime

SYSTem:TIME?	agN67xx_getTime

SYSTem:VERSion?	agN67xx_cmdString_Q

TRIGger Subsystem

ABORt:ACQuire	agN67xx_abort

ABORt:DLOG	agN67xx_dlogAbort

ABORt:TRANsient	agN67xx_abort

TRIGger:ACQuire[:IMMediate]	agN67xx_trigger

TRIGger:ACQuire:SOURce  BUS | PIN | TRAN	agN67xx_setCurrAcqTrig

agN67xx_setVoltAcqTrig

TRIGger:ACQuire:SOURce?	agN67xx_getCurrAcqTrig

agN67xx_getVoltAcqTrig

TRIGger:DLOG[:IMMediate]	agN67xx_dlogTrigger

TRIGger:DLOG:CURRent[:LEVel] <NRf>	agN67xx_dlogConfigureTriggerCurrent

TRIGger:DLOG:CURRent?	agN67xx_dlogConfigureTriggerCurrent

TRIGger:DLOG:CURRent:SLOPe POS | NEG	agN67xx_dlogConfigureTriggerCurrent

TRIGger:DLOG:CURRent:SLOPe?	agN67xx_dlogConfigureTriggerCurrent

TRIGger:DLOG:SOURce  <source>	agN67xx_dlogConfigureTriggerSource

TRIGger:DLOG:SOURce?	agN67xx_dlogConfigureTriggerSource

TRIGger:DLOG:VOLTage[:LEVel] <NRf>	agN67xx_dlogConfigureTriggerVoltage

TRIGger:DLOG:VOLTage?	agN67xx_dlogConfigureTriggerVoltage

TRIGger:DLOG:VOLTage:SLOPe POS | NEG	agN67xx_dlogConfigureTriggerVoltage

TRIGger:DLOG:VOLTage:SLOPe?	agN67xx_dlogConfigureTriggerVoltage

TRIGger:TRANsient[:IMMediate]	agN67xx_trigger

TRIGger:TRANsient:SOURce BUS | PIN | TRAN	agN67xx_setTransientTrigSource

TRIGger:TRANsient:SOURce?	agN67xx_getTransientTrigSource

Functions with no corresponding SCPI commands

agN67xx_init

agN67xx_close

agN67xx_dcl

agN67xx_error_message

agN67xx_errorQueryDetect

agN67xx_errorQueryDetect_Q

agN67xx_getMeasTimeout

agN67xx_setMeasTimeout

agN67xx_timeOut

agN67xx_timeOut_Q

Application Functions

Read Output Status	agN67xx_readOutputStatus

Set Output Voltage and Current	agN67xx_outputVoltCurr

Set and Measure the Output	agN67xx_setMeasure

Specify a Delay	agN67xx_doDelay


Error Handling

Events and errors within a instrument control program can be detected by polling the instrument.  Most of the example programs in this help file poll (query) the instrument after each function to determine if an error or other event has occurred. Polling is used in application development environments (ADEs) that do not support asynchronous activities where callbacks can be used. The example programs set up and use polling as shown below.

1.	Declare a variable to contain the function completion code.

ViStatus errStatus;

Every driver function returns the completion code ViStatus. If the function executes with no I/O errors, driver errors, or instrument errors, ViStatus is 0 (VI_SUCCESS). If an error occurs, ViStatus is a negative error code. Warnings are positive error codes, and indicate the operation succeeded but special conditions exist.

2.	Enable automatic instrument error checking following each function call.

agN67xx_errorQueryDetect(vi, VI_TRUE);

When enabled, the driver queries the instrument for an error condition before returning from the function. If an error occurred, errStatus (Step 1) will contain a code indicating that an error was detected (agN67xx_INSTR_ERROR_DETECTED).

3.	Check for an error (or event) after each function.

errStatus = agN67xx_cmd(vi, "MEAS:FREQ");

check(vi, errStatus);

After the function executes, errStatus contains the completion code. The completion code and instrument id are passed to an error checking routine. In the above statement, the routine is called 'check'.

4.	Create a routine to respond to the error or event. The following routine is used by the example programs to read errors.

void check (ViSession vi, ViStatus errStatus)

{

/* variables for error code and message */

ViInt32 inst_err;

ViChar err_message[256];

/* VI_SUCCESS is 0 and is defined in VISATYPE.h */

if(VI_SUCCESS > errStatus)

{

/* send a device clear - to ensure communication with the instrument */

agN67xx_dcl(vi);

/* agN67xx_INSTR_ERROR_DETECTED defined in agN67xx.h */

if(agN67xx_INSTR_ERROR_DETECTED == errStatus)

{

/* query the instrument for the error */

agN67xx_error_query(vi, &inst_err, err_message);

/* display the error */

printf("Instrument Error : %ld, %s\n", inst_err, err_message);

}

else	/* driver error */

{

/* get the driver error message */

agN67xx_error_message(vi, errStatus, err_message);

/* display the error */

printf("Driver Error : %ld, %s\n", errStatus, err_message);

}

/* optionally reset the instrument, close the instrument handle */

agN67xx_reset(vi);

agN67xx_close(vi);

exit(1);

}

return;

}


Example Programs

This help file contains three Visual C/C++ and Visual BASIC 4.0 example programs. Some of the programs are similar to those found in the user's manual. Some examples include the functionality shown by one or more of the manual examples. Each example has been compiled and tested, and can be copied to the Windows clipboard and pasted into your development environment.

Example 1 - Programming the Output.

Visual BASIC example	C/C++ example

These examples illustrate how to set the output voltage, output current, over-voltage and over-current protection, and enable the output. After the output is enabled the programs measure the actual output voltage. A generic error checking section is included at the end of the programs. As written, the programs are configured to communicate with the instrument over the GPIB interface.

Example 2 - Programming an Output List.

Visual BASIC example	C/C++ example

These examples illustrate how to program an output list. The programs execute a 10 point voltage and current list. They also specify 10 different dwell times. A generic error checking section is included at the end of the programs. As written, the programs are configured to communicate with the instrument over the GPIB interface. A generic error checking section is included at the end of the programs. As written, the programs are configured to communicate with the instrument over the GPIB interface.

Example 3 - Triggering Output Steps and Measurements.

Visual BASIC example	C/C++ example

These examples illustrate how to program the output voltage in step mode and also demonstrate how to set up and trigger measurements.

C/C++ Programming Notes

To use the C/C++ example programs provided in this section, you need to do the following:

1. When running the C/C++ application, copy and paste the example program into the application.

2. Compile your example program as a Console Application Program. You must use _cdecl calling convention.

3. Link your program with the agN67xx_32.lib file.

Visual BASIC Programming Notes

To use the Visual BASIC example programs provided in this section, you need to do the following:

1. Start in Visual BASIC with a New project.

2. Copy and paste the example program into the Form object, Load procedure.

3. Copy and paste the Visual BASIC error checking subroutine into (General) object.

4. Add the agN67xx.bas declaration module from the agN67xx install directory to the project. Omitting this step results in a compiler error.


Function Reference (Alphabetical)

agN67xx_abort

agN67xx_arm

agN67xx_close

agN67xx_cmd

agN67xx_cmdInt

agN67xx_cmdInt16_Q

agN67xx_cmdString_Q

agN67xx_configureIOPort

agN67xx_configureOVP

agN67xx_configureOffSequence

agN67xx_configureOnSequence

agN67xx_configureRegister

agN67xx_dcl

agN67xx_disableLocalControls

agN67xx_dlogAbort

agN67xx_dlogConfigureFunction

agN67xx_dlogConfigureFunctionMinMax

agN67xx_dlogConfigureTime

agN67xx_dlogConfigureTriggerCurrent

agN67xx_dlogConfigureTriggerOffset

agN67xx_dlogConfigureTriggerSource

agN67xx_dlogConfigureTriggerVoltage

agN67xx_dlogInitiate

agN67xx_dlogTrigger

agN67xx_doDelay

agN67xx_enableLocalControls

agN67xx_errorQueryDetect

agN67xx_errorQueryDetect_Q

agN67xx_error_message

agN67xx_error_query

agN67xx_fetchCurr

agN67xx_fetchCurrArray

agN67xx_fetchVolt

agN67xx_fetchVoltArray

agN67xx_fileDelete

agN67xx_fileExportDlog

agN67xx_fileGetSize

agN67xx_fileReadFirst

agN67xx_fileReadNext

agN67xx_getAcqSenseFunc

agN67xx_getChannels

agN67xx_getCurr

agN67xx_getCurrAcqTrig

agN67xx_getCurrentCompensate

agN67xx_getCurrSenseRange

agN67xx_getDate

agN67xx_getDigitalPort

agN67xx_getEnableReg

agN67xx_getFourWireSense

agN67xx_getMeasTimeout

agN67xx_getMeasurementRange

agN67xx_getMeasurementTrigSource

agN67xx_getMeasurementWindow

agN67xx_getOcpParams

agN67xx_getOutpTrigSource

agN67xx_getOutputCoupleChannels

agN67xx_getOutputCoupleDelayOffset

agN67xx_getOutputCoupleDelayOffsetMode

agN67xx_getOutputCoupleEnabled

agN67xx_getOutputCoupleMaxDelayOffset

agN67xx_getOutputEnabled

agN67xx_getOutputGroup

agN67xx_getOutputInhibitMode

agN67xx_getOutputState

agN67xx_getPowerLimit

agN67xx_getPowerLimitMax

agN67xx_getPowerOnState

agN67xx_getProtectionCoupleFaults

agN67xx_getProtectionOCPDelay

agN67xx_getProtectionOVPLimit

agN67xx_getProtectionOVPLimitMax

agN67xx_getRegister

agN67xx_getRelayPolarity

agN67xx_getStatusSerialPoll

agN67xx_getSweepParams

agN67xx_getSystemFirmwareNumber

agN67xx_getSystemGroupedInformation

agN67xx_getSystemModuleName

agN67xx_getSystemModuleOption

agN67xx_getSystemModuleSerialNumber

agN67xx_getSystemName

agN67xx_getSystemSerialNumber

agN67xx_getTime

agN67xx_getTransientListLength

agN67xx_getTransientStepTrigLevel

agN67xx_getTransientStepTrigOut

agN67xx_getTransientTrigSource

agN67xx_getTriggerMode

agN67xx_getVolt

agN67xx_getVoltAcqTrig

agN67xx_getVoltSenseRange

agN67xx_getVoltageSlewRate

agN67xx_init

agN67xx_measureCurr

agN67xx_measureCurrArray

agN67xx_measureVolt

agN67xx_measureVoltArray

agN67xx_measurementConfigure

agN67xx_measurementFetch

agN67xx_measurementFetchArray

agN67xx_measurementMeasure

agN67xx_measurementMeasureArray

agN67xx_measurementTrigAbort

agN67xx_measurementTrigImmediate

agN67xx_measurementTrigInitiate

agN67xx_opc_Q

agN67xx_operCond_Q

agN67xx_operEvent_Q

agN67xx_outputCurrentLimit

agN67xx_outputEnableAll

agN67xx_outputVoltCurr

agN67xx_outputVoltageLevel

agN67xx_queryCurrentLimitMax

agN67xx_queryIOPort

agN67xx_queryVoltageLevelMax

agN67xx_quesCond_Q

agN67xx_quesEvent_Q

agN67xx_readOutputStatus

agN67xx_readStatusByte_Q

agN67xx_recallState

agN67xx_reset

agN67xx_resetOutputProtection

agN67xx_revision_query

agN67xx_saveState

agN67xx_self_test

agN67xx_sendSoftwareTrigger

agN67xx_setAcqSenseFunc

agN67xx_setCurr

agN67xx_setCurrAcqTrig

agN67xx_setCurrentCompensate

agN67xx_setCurrSenseRange

agN67xx_setDate

agN67xx_setDigitalPort

agN67xx_setEnableReg

agN67xx_setFourWireSense

agN67xx_setMeasTimeout

agN67xx_setMeasure

agN67xx_setMeasurementRange

agN67xx_setMeasurementTrigSource

agN67xx_setMeasurementWindow

agN67xx_setOcpParams

agN67xx_setOutpTrigSource

agN67xx_setOutputCoupleChannels

agN67xx_setOutputCoupleDelayOffset

agN67xx_setOutputCoupleDelayOffsetMode

agN67xx_setOutputCoupleEnabled

agN67xx_setOutputEnabled

agN67xx_setOutputGroup

agN67xx_setOutputInhibitMode

agN67xx_setOutputState

agN67xx_setPowerLimit

agN67xx_setPowerLimitMax

agN67xx_setPowerOnState

agN67xx_setProtectionCoupleFaults

agN67xx_setProtectionOCPDelay

agN67xx_setProtectionOVPLimit

agN67xx_setRegister

agN67xx_setRelayPolarity

agN67xx_setSweepParams

agN67xx_setTime

agN67xx_setTransientStepTrigLevel

agN67xx_setTransientStepTrigOut

agN67xx_setTransientTrigSource

agN67xx_setTriggerMode

agN67xx_setVolt

agN67xx_setVoltAcqTrig

agN67xx_setVoltSenseRange

agN67xx_setVoltSlewRate

agN67xx_statusClear

agN67xx_statusPreset

agN67xx_stdEvent_Q

agN67xx_SystemReboot

agN67xx_timeOut

agN67xx_timeOut_Q

agN67xx_transientListConfigure

agN67xx_transientListPoints

agN67xx_transientListTrigOutPoints

agN67xx_transientTrigAbort

agN67xx_transientTrigImmediate

agN67xx_transientTrigInitiate

agN67xx_trg

agN67xx_trigger


Function Reference (Hierarchical)

The hierarchical function reference lists the agN67xx VXIplug&play functions by classes as defined by the agN67xx function panel (agN67xx.fp). The function panel runs under Agilent VEE, LabWindows®, and LabVIEW®.

DRIVER: agN67xx

Initialize

File Functions

Delete

Export Datalog

Get Size

Read First

Read Next

Data Logs

Abort

Initiate

Configure Function Min Max

Configure Time

Configure Trigger Offset

Configure Trigger Source

Trigger

Data Log

Configure Function

Configure Trigger Current

Configure Trigger Voltage

Application Functions

Read Output Status

Output Voltage and Current

Set and Measure

Delay Program

Measurements

Voltage Measurement

Current Measurement

Measure Voltage Waveform

Measure Current Waveform

Fetch Voltage Measurement

Fetch Current Measurement

Fetch Voltage Waveform

Fetch Current Waveform

Set Measurement Timeout

Query Measurement Timeout

Configure Acquisition Trigger

Set Voltage Acq Trigger

Query Voltage Acq Trigger

Set Current Acq Trigger

Query Current Acq Trigger

Set Sweep Parameters

Query Sweep Parameters

Measurement

Configure

Fetch

Measure

Fetch Array

Measure Array

Set Range

Query Range

Set Trigger Source

Query Trigger Source

Set Window Function Type

Query Window Function Type

Trigger Abort

Trigger Immediate

Trigger Initiate

Get Current Compensate

Set Current Compensate

Output

Reset Output Protection

Get Channel Number

Set Output State

Query Output State

Set Output Couple Enabled

Query Output Couple Enabled

Set Output Couple Channels

Query Output Couple Channels

Set Output Couple Delay Offset

Query Output Couple Delay Offset

Query Output Couple Max Delay Offset

Set Output Couple Delay Offset Mode

Query Output Couple Delay Offset Mode

Set Power-On Recall State

Query Power-On Recall State

Set Relay Polarity

Query Relay Polarity

Query Voltage Level Max

Query Current Limit Max

Configure On Sequence

Configure Off Sequence

Enable All Output

Voltage Range and Level

Current Range and Limit

Set Enabled

Query Enabled

Set Inhibit Mode

Query Inhibit Mode

Set Voltage Slew Rate

Query Voltage Slew Rate

Set Power Limit

Query Power Limit

Set Power Limit Max

Query Power Limit Max

Configure Trigger

Set Trigger Source

Query Trigger Source

Sense

Set Acquisition Sense Setting

Query Acquisition Sense Setting

Set Four Wire Sense

Query Four Wire Sense

Set Voltage Range

Query Voltage Range

Set Current Range

Query Current Range

Source

Set Current Parameter

Query Current Parameter

Set Voltage Parameter

Query Voltage Parameter

Set Over-Current Protection

Query Over-Current Protection

Set Digital I/O Port

Query Digital I/O Port

Statuses

Query SerialPoll

Clear

Preset

Status

Set Register

Query Register

Configure Register

Triggers

Arm Trigger

Abort Trigger

Generate Trigger

Send Software Trigger

Trigger

Set Trigger Mode

Query Trigger Mode

Protections

Set Protection Couple

Query Protection Couple

Protection

Set OVP Limit

Query OVP Limit

Query OVP Limit Max

Set OCP Delay

Query OCP Delay

Configure OVP

Systems

Set Date

Query Date

Set Time

Query Time

Query Name

Query Serial Number

Query Firmware Number

Disable Local Controls

Enable Local Controls

Reboot

Recall State

Save State

Configure IO Port

Query IO Port

Set Output Group

Query Output Group

System

Query Grouped Information

Query Module Name

Query Module Option

Query Module Serial Number

Transients

Transient

Query List Length

Set Trigger Source

Query Trigger Source

Set Step Trigger Level

Query Step Trigger Level

Set Step Trigger Out

Query Step Trigger Out

List Configure

List Points

List Out Points

Trigger Abort

Trigger Immediate

Trigger Initiate

Utility

Reset

Self-Test

Revision Query

Device Clear

Group Execute Trigger

Error

Error Message

Error Query

Set Error Query Detect

Query Error Query Detect

Time Out

Set Timeout

Query Timeout

Synchronization

Query Operation Complete

Status

Read Status Byte

Operation Status Events

Operation Status Conditions

Questionable Status Events

Questionable Status Conditions

Standard Event Status

Set Enable Register

Query Enable Register

Passthrough Functions

Send String

Query String

Send Integer

Query Int16

Close


Getting Started with Agilent VEE

Agilent Technologies Visual Engineering Environment (Agilent VEE, formerly HP VEE) is a family of visual programming products optimized for instrument control applications.  To develop programs in Agilent VEE, you connect graphical "objects" instead of writing lines of code.  These programs resemble easy-to-understand block diagrams with lines.

Agilent VEE allows you to leverage your investment in textual languages by integrating with languages such as C, C++, Visual Basic, FORTRAN, Pascal and HP BASIC.  Agilent VEE is used in a wide variety of applications such as test and measurement, data acquisition and monitoring and control.  Agilent VEE controls GPIB, VXI, Serial, GPIO, PC Plug-in and LAN instruments directly over the interfaces or by using instrument drivers.

Agilent VEE supports VXIplug&play drivers in the WIN, WIN95, WINNT and HP-UX frameworks.  In addition, HP / Agilent VEE versions 3.2 and greater support the graphical Function Panel interface in VXIplug&play drivers, which provides a function tree of the hierarchy of the driver.   In addition Agilent VEE automatically calls the "initialize" and "close" functions and performs automatic error checking.  Agilent VEE gives you an easy-to-use high-level interface to VXIplug&play drivers while also allowing you low-level control.  Our customers say Agilent VEE is the easiest way to call VXIplug&play drivers.

The 32-bit (win95 or winnt framework) Agilent Technologies N6700 driver can be used with Agilent / HP VEE 3.2 and above.  These versions run on Windows 95/98 and Windows NT.

To access the functions of the Agilent Technologies N6700 driver from within VEE, consult the VEE manual that documents using VXIplug&play drivers.


Getting Started with LabView

The 32-bit Agilent Technologies N6700 driver can be used with LabVIEW 4.0 and above.  LabVIEW 4.0 is a 32-bit version of LabVIEW which runs on Windows 95 and Windows NT.

To access the functions of the Agilent Technologies N6700 instrument driver from within LabVIEW 4.0, select File from the main menu, then select the Convert CVI FP File submenu item.  In the file selection dialog box which appears, select agN67xx.fp and click on the OK button.  LabVIEW will create a series of VI's, one per driver function.  It will create a file called agN67xx.llb which contains these VI's.  This library of VI's can then be accessed like any other VI library in LabVIEW.

You must use the 32-bit version of the Agilent Technologies N6700 driver with LabVIEW 4.0.

LabView is a trademark of National Instruments Corporation


Getting Started with LabWindows

The 32-bit Agilent Technologies N6700 driver can be used with LabWindows 4.0 and above.  LabWindows 4.0 is a 32-bit version of LabWindows which runs on Windows 95 and Windows NT.

To access the functions of the Agilent Technologies N6700 driver from within LabWindows, select Instrument from the main menu, and then select the LOAD... submenu item.  In the file selection dialog box which appears, select agN67xx.fp and click on the OK button.  LabWindows will load the function panel and instrument driver.  The driver now appears as a selection on the Instrument menu, and can be treated like any LabWindows driver.

LabWindows is a trademark of National Instruments Corporation


In Case of Trouble

A variety of support is available through the Web including troubleshooting hints, technical information and access to the most up-to-date drivers.

For general troubleshooting support and technical information see:

http://www.agilent.com/find/inst_drivers

For access to the most up to date instrument drivers see:

http://www.agilent.com/find/inst_drivers

If you do not have Internet access, the drivers can be obtained by contacting your country support organization.  The U.S. phone number is 800-452-4844.  A list of contact information for other countries is available at http://www.agilent.com/find/contacts00.


Instrument Addressing

When opening an instrument session using the agN67xx_init() function, an instrument address must be specified for the function’s ViRsrc InstrDesc parameter.

When using the Agilent Technologies N6700 with the GPIB interface the instrument address is based on the logical address and on the communication interface between the computer/controller and the instrument.  The Agilent Technologies N6700 has a factory-set logical GPIB address of 5.

For more information see:

Opening an Instrument Session -- Examples


Introduction to Programming

To identify the functions you will need to write your instrument control program, select:

Selecting Functions

To see some typical programs, select:

Example Programs

For information on how to create programs and use this driver in a number of common programming environments, select:

Creating, Compiling and Linking 32-bit Programs Using Microsoft Visual C++ Version 6.0

Creating, Compiling and Linking 32-bit Programs Using the HP-UX ANSI C Compiler

Creating and Running Visual BASIC 6.0 Applications

These sections explain how to begin using the Agilent Technologies N6700 instrument driver with these products.

Getting Started with Agilent VEE

Getting Started with LabView

Getting Started with LabWindows


Making Measurements

Measuring Voltage and Current

Each output channel has its own measurement capability. The output voltage and current is measured by acquiring a number of samples at the selected time interval, applying a window function to the samples, and averaging the samples.

The power-on and *RST time interval and number of samples settings yield a measurement time of 21 milliseconds per reading (1024 data points at 20.48 s intervals). The windowing function is Rectangular. Use the following commands to make a measurement:

ViReal64 voltResult;

ViReal64 currResult;

agN67xx_measureVolt(instrumentHandle, channelNumber, &voltResult);

agN67xx_measureCurr(instrumentHandle, channelNumber, &currResult);

Some models have simultaneous voltage and current measurement capability. Each output channel has its own measurement capability. In this case BOTH voltage and current are acquired on any  measurement, regardless of the parameter that is being measured.

Measurement Ranges

Some models have two voltage and current measurement ranges. Selecting a lower measurement range provides greater measurement accuracy, provided that the measurement does not exceed the range. The commands that control the ranges are:

agN67xx_setCurrSenseRange(instrumentHandle, channelNumber, currSenseRange);

agN67xx_setVoltSenseRange(instrumentHandle, channelNumber, voltSenseRange);

Programming a value within a range selects the range. Note that when the range is set to MAX, the maximum current that can be measured is the maximum rating of the unit.


Opening an Instrument Session

Introduction

To control an instrument from a program, a communication path between the computer/controller and the instrument must be opened. This path is known as an instrument session and is opened with the function:

ViStatus agN67xx_init( ViRsrc InstrDesc, ViBoolean id_query, ViBoolean reset, ViPSession vi );

Instruments are assigned a handle when the instrument session is opened. The handle, which is a pointer to the instrument, is the first parameter passed in all subsequent calls to driver functions.

The parameters of function agN67xx_init include:

ViRsrc InstrDesc - the address of the instrument.

ViBoolean id_query - a Boolean flag which indicates if in-system verification should be performed. Passing VI_TRUE (1) will perform an in-system verification. Passing VI_FALSE (0) will not.  If you set id_query to false it is possible to use the generic functions of the instrument driver with other instruments.

ViBoolean reset - a Boolean flag which indicates if the instrument should be reset when it is opened. Passing VI_TRUE (1) will perform a reset when the session is opened. Passing VI_FALSE (0) will not perform a reset.

ViPSession vi - a pointer to an instrument session. vi is the handle which addresses the instrument and is the first parameter passed in all driver functions.

Successful completion of this function returns VI_SUCCESS.

For more information see:

Opening an Instrument Session -- Examples


Opening an Instrument Session -- Examples

The address strings for the various interfaces are given below.  In each string, ‘INSTR’ is a VISA resource type.  If you want to be compatible with future releases of VISA you must include the INSTR parameter in the syntax.

Visual C++ Programming

Visual BASIC examples are found after the Visual C++ Examples

GPIB addressing - used when programming instruments using a GPIB interface:

GPIB[board]::logical address[::secondary address][::INSTR]

examples:

/* example uses default GPIB board number for a single interface board */

ViSession vi;

ViStatus vistat;

if ((vistat = agN67xx_init("GPIB0::5::INSTR", 0, 0, &vi)) != VI_SUCCESS)

{

/* handle error here, vistat contains return error code */

}

or

#define ADDRESS "GPIB0::5::INSTR"

ViSession vi;

ViStatus vistat;

if ((vistat = agN67xx_init(ADDRESS, 0, 0, &vi) != VI_SUCCESS)

{

/* handle error here, vistat contains return error code */

}

Visual BASIC Programming

Visual C++ examples are found at the beginning of this topic.

GPIB addressing - used when programming instruments using a GPIB interface:

GPIB[board]::logical address[::secondary address][::INSTR]

examples:

Dim vi As Long

Dim errStatus As  Long

errStatus = agN67xx_init("GPIB0::5::INSTR", 0, 0, vi)

or

Dim vi As Long

Dim errStatus As  Long

Dim Addr As String

Addr = "GPIB0::5::INSTR"

errStatus = agN67xx_init(Addr, 0, 0, vi)


Programming Output Lists

Program an Output Pulse Train

The following procedure shows how to generate an output pulse train using the List function.

Pulse Train Figure

Step 1.	Set the voltage or current function for which you want to generate a pulse train to List mode. This example programs a voltage pulse.

agN67xx_setTriggerMode(instrumentHandle, channelNumber, AGN67XX_VOLTAGE, AGN67XX_MODE_LIST);

Step 2.	Program the list steps. In this example, two list steps are programmed. The voltage array contains two steps: an amplitude of 15 V for the on-time of the pulse, and an amplitude of 0 V for the off-time of the pulse. The dwell array also contains two steps: a value of  1 second for the on-time, and a value of 2 seconds for the of time. The current array is not programmed and contains a default value of 0.

volt_array [0] = 15.0;	dwell_array [0] = 1.0;
volt_array [1] = 0.0;	dwell_array [1] = 2.0;

agN67xx_transientListPoints(instrumentHandle, channelNumber, 2, volt_array, dwell_array);

Step 3.	Configure the list. Set the list pacing to Auto, so that as each dwell time elapses, the next step is immediately output. Also, specify the output state after the pulse train completes. In this example a value of 0 specifies the output state that was in effect before the pulse train started. Finally, set the number of times the list is to be repeated, In this example, programming a repeat value of 50 will generate a pulse train of 50 pulses.

agN67xx_transientListConfigure(instrumentHandle, channelNumber, 0, 0, 50);

Step 4.	Specify if you want the output pulse to generate a trigger signal that can be used to trigger actions on other output channels or on any external equipment connected to the digital port. To do this you must program an array that generates a trigger for the specified steps in a list, in the same way that arrays were specified for the voltage and dwell times. For example, to generate a trigger signal at the End of step 0, but not at the end of step 1, program the following array:

eost_array [0] = 1;
eost_array [1] = 0;

In this example, the Bost (beginning of step trigger) array is not programmed and contains a value of 0.

agN67xx_transientListTrigOutPoints(instrumentHandle, channelNumber, 2, eost_array);

Step 5.	Select the trigger source that will generate the pulse or pulse train. For example, to select Bus triggers as the trigger source, use:

agN67xx_getVoltAcqTrig(instrumentHandle, channelNumber, AGN67XX_TRIGGER_SOURCE_BUS);

Step 6.	Initiate the output trigger system. To enable the trigger system for one transient event or trigger use:

agN67xx_arm(instrumentHandle, channelNumber, AGN67XX_ARM_OUTPUT_ONCE);

Step 7. Trigger the output pulse or pulse train.

agN67xx_trigger(instrumentHandle, channelNumber, AGN67XX_TRIG_TRANSIENT);

Program an Arbitrary List

The following procedure shows how to generate the list of voltage changes as illustrated in the following figure using the List function.

Arbitrary List Figure

Step 1.	Set the function, voltage or current, for which you want to generate a list to List mode. This example programs a voltage list.

agN67xx_setTriggerMode(instrumentHandle, channelNumber, AGN67XX_VOLTAGE, AGN67XX_MODE_LIST);

Step 2.	Program the list steps. In this example, six list steps are programmed. The voltage array contains six amplitude values, one for each step: 9, 0, 6, 0, 3, 0. The dwell array also contains six values, a dwell time in seconds for each step: 2, 3, 5, 3, 7, 3. The current array is not programmed and contains a default value of 0.

volt_array [0] = 9.0;	dwell_array [0] = 2.0;
volt_array [1] = 0.0;	dwell_array [1] = 3.0;
volt_array [2] = 6.0;	dwell_array [2] = 5.0;
volt_array [3] = 0.0;	dwell_array [3] = 3.0;
volt_array [4] = 3.0;	dwell_array [4] = 7.0;
volt_array [5] = 0.0;	dwell_array [5] = 3.0;

agN67xx_transientListPoints(instrumentHandle, channelNumber, 6, volt_array, dwell_array);

Step 3.	Configure the list. Set the list pacing to Auto, so that as each dwell time elapses, the next step is immediately output. Also, specify the output state after the list completes. In this example a value of TRUE specifies that the list will remain at the last step values when the list completes. Finally, set the number of times the list is to be repeated, In this example, programming a repeat value of 2 will repeat the list twice. Note that the infiniteRepeat parameter is set FALSE.

agN67xx_transientListConfigure(instrumentHandle, channelNumber, AGN67XX_LIST_PACE_AUTO, VI_TRUE, 2, VI_FALSE);

Step 4.	Specify if you want the list to generate trigger signals that can be used to trigger actions on other output channels or on any external equipment connected to the digital port. To do this you must program an array that generates a trigger for the specified steps in a list, in the same way that arrays were specified for the voltage and dwell times.

For example, to generate a trigger signal at the Beginning of only step 4, program the following array:

bost_array [0] = 0;
bost_array [1] = 0;
bost_array [2] = 0;
bost_array [3] = 0;
bost_array [4] = 1;
bost_array [5] = 0;

For example, to generate a trigger signal at the End of steps 0, 2, and 4, program the following array:
eost_array [0] = 1;
eost_array [1] = 0;
eost_array [2] = 1;
eost_array [3] = 0;
eost_array [4] = 1;
eost_array [5] = 0;

agN67xx_transientListTrigOutPoints(instrumentHandle, channelNumber, 6, eost_array, bost_array);

Trigger List Figure

Step 5. Select a trigger source, initiate, and trigger the list.


Programming an Output List - C/C++ Example

/****************************************************************************************/

/*  Copyright (C) 2004 Agilent Technologies Company                                             */

/*---------------------------------------------------------------------------*/

/* Example program for N6700A Dynamic Measurement DC Source P&P driver           */

/* Revision: A.00.00                                                                                              */

/*                                                                                                                        */

/* This program demonstrates how to communicate with the N67xx Modular Power  */

/* System using the VXI Plug&Play driver.                                                              */

/***************************************************************************************/

/* This example illustrates how to program and trigger a voltage and current list.             */

/* The list values are programmed using an array. The corresponding programmed dwell	*/

/* values determine how long the output remains at any given voltage value in the list.	*/

#include <visa.h>

#include <stdio.h>   /* prototype  for printf */

#include <string.h>	 /* prototype for strcpy() */

#include <stdlib.h>	 /* prototype for exit() */

#include "agN67xx.h"

void check (ViSession instrumentHandle, ViStatus errStatus) ;

ViStatus main(void)

{

ViSession	vi;	/* Instrument Handle */

ViStatus	errStatus;	/* Error Status */

ViInt16	nChannel;	/* Working channel */

ViInt16	nChannelNumber;	/* Total installed channels */

int	i;

ViChar	ModuleName[30];

ViChar	OptionName[30];

ViInt16	listlength;

ViReal64	listVoltage[3], listCurrent[3], listDwell[3];

/* Open the instrument for Communication */

/* The GPIB's address can find by front pannel menu("System\IO\GPIB"). */

errStatus = agN67xx_init("GPIB0::5::INSTR", VI_TRUE, VI_TRUE, &vi) ;

/* For USB Port */

/* The USB's resource string can find by front pannel menu("System\IO\USB\Identification") */

// errStatus = agN67xx_init("USB0::2391::3079::US00000208::INSTR", VI_TRUE, VI_TRUE, &vi);

/* For Lan Port	*/

/* The LAN's resource string can find by front pannel menu("System\IO\LAN\Config\Name"). */

// errStatus = agN67xx_init("TCPIP0::A-N6701A-00208::INSTR", VI_TRUE, VI_TRUE, &vi);

check (vi,errStatus);

/* Enable error checking to be done at the end of every function call */

errStatus = agN67xx_errorQueryDetect(vi, VI_TRUE);

check(vi,errStatus);

/* Get how many installed channels */

errStatus = agN67xx_getChannels(vi, &nChannelNumber);

check (vi, errStatus);

/* Initialize list data */

listVoltage[0] = 5.0;	/* Volt */

listVoltage[1] = 7.0;

listVoltage[2] = 10.0;

listCurrent[0] = 0.25;	/* Ampere */

listCurrent[1] = 0.5;

listCurrent[2] = 1.0;

listDwell[0] = 1.0;	/* Seconds */

listDwell[1] = 1.0;

listDwell[2] = 1.0;

listlength = 3;	/* Points */

for(i = 1; i <= nChannelNumber; i++)

{

nChannel = i;

/* Get channel's model number */

errStatus = agN67xx_getSystemModuleName(vi, nChannel,ModuleName);

check (vi, errStatus);

printf ("agN67xx_getSystemModuleName (@%d) > %s\n",nChannel,ModuleName);

/* Get channel's option string */

errStatus = agN67xx_getSystemModuleOption(vi, nChannel,OptionName);

check (vi, errStatus);

printf ("agN67xx_getSystemModuleOption (@%d) > %s\n",nChannel,OptionName);

/* The List features applies to Models N6761A, N6762A, and Models N6751A, N6752A. with Test Extensions Option 054.*/

if( strcmp(ModuleName,"N6761A") == 0 || strcmp(ModuleName,"N6762A") == 0 ||

(strcmp(ModuleName,"N6751A") == 0 && strcmp(OptionName,"Opt 054") < 0) ||

(strcmp(ModuleName,"N6752A") == 0 && strcmp(OptionName,"Opt 054") < 0))

{

errStatus = agN67xx_setTriggerMode(vi, nChannel, AGN67XX_VOLTAGE, AGN67XX_MODE_LIST);

check (vi, errStatus);

errStatus = agN67xx_setTriggerMode(vi, nChannel, AGN67XX_CURRENT, AGN67XX_MODE_LIST);

check (vi, errStatus);

errStatus = agN67xx_transientListPoints (vi, nChannel,listlength,listVoltage,listCurrent,listDwell);

check (vi, errStatus);

errStatus = agN67xx_setOutputState(vi, nChannel, VI_TRUE, VI_TRUE);

check (vi, errStatus);

/* Enables the output transient system to receive triggers */

errStatus = agN67xx_transientTrigInitiate(vi, nChannel);

check (vi, errStatus);

/* Triggers the output immediately */

errStatus = agN67xx_transientTrigImmediate(vi, nChannel);

check (vi, errStatus);

}

}

    /* Close the instrument session */

    agN67xx_close(vi);

    printf ( "PROGRAM COMPLETED\n");

printf("Press Enter key to continue...\n");

getchar();

    return VI_SUCCESS ;

}

void check (ViSession instrumentHandle, ViStatus errStatus)

{

/* variables for error code and message */

ViInt32 inst_err;

ViChar err_message[256];

/* VI_SUCCESS is 0 and is defined in VISATYPE.h */

if(VI_SUCCESS > errStatus)

{

/* send a device clear - to ensure communication with the instrument */

agN67xx_dcl(instrumentHandle);

/* AGN67XX_INSTR_ERROR_DETECTED is defined in agN67xx.h */

if(AGN67XX_INSTR_ERROR_DETECTED == errStatus)

{

/* query the instrument for the error */

agN67xx_error_query(instrumentHandle, &inst_err, err_message);

/* display the error */

printf("Instrument Error : %ld, %s\n", inst_err, err_message);

}

else	/* driver error */

{

/* get the driver error message */

agN67xx_error_message(instrumentHandle, errStatus, err_message);

/* display the error */

printf("Driver Error : %ld, %s\n", errStatus, err_message);

}

   /* optionally reset the instrument, close the instrument handle */

   agN67xx_reset(instrumentHandle);

   agN67xx_close(instrumentHandle);

   printf("Press Enter key to continue...\n");

   getchar();

   exit(-1);

}

}


Programming an Output List - Visual BASIC Example

Option Explicit     'All variables MUST be declared

Private Sub setButton_Click()

    Dim vi As Long

    Dim errStatus As Long

    Dim Output As Integer

    Dim nChannel As Integer

    Dim nChannelNumber As Integer

    Dim FrameName As String * 256

    Dim FrameSerialNumber As String * 256

    Dim firmwareNumber As String * 256

    Dim moduleName As String * 256

    Dim optionName As String * 256

    Dim listlength As Integer

    Dim DriverRevision As String * 256

    Dim FirmwareRevision As String * 256

    Dim listVoltage(4) As Double

    Dim listCurrent(4) As Double

    Dim listDwell(4) As Double

    Dim serialNumber As String * 256

    Dim voltage, current As Double

    Dim measvoltage, meascurrent As Double

    '  Open the instrument for Communication

    '  The GPIB's address can find by front pannel menu("System\IO\GPIB").

    errStatus = agN67xx_init("GPIB0::5::INSTR", 1, 0, vi)

    ' For USB port

    ' The USB's resource string can find by front pannel menu("System\IO\USB\Identification") */

    ' errStatus = agN67xx_init("USB0::2391::3079::US00000208::INSTR", 1, 0, vi)

    ' For Lan Port

    ' The LAN's resource string can find by front pannel menu("System\IO\LAN\Config\Name").

    ' errStatus = agN67xx_init("TCPIP0::A-N6701A-00208::INSTR", 1, 0, vi)

    check vi, errStatus

    ' Enable error checking to be done at the end of every function call

    errStatus = agN67xx_errorQueryDetect(vi, VI_TRUE)

    check vi, errStatus

    ' Get how many installed channels

    errStatus = agN67xx_getChannels(vi, nChannelNumber)

    check vi, errStatus

    ' Get how many installed channels

    errStatus = agN67xx_getChannels(vi, nChannelNumber)

    check vi, errStatus

    ' Initialize list data

    listVoltage(0) = 5#   ' Volt

    listVoltage(1) = 7#

    listVoltage(2) = 10#

    listCurrent(0) = 0.25  ' Ampere

    listCurrent(1) = 0.5

    listCurrent(2) = 1#

    listDwell(0) = 1#     ' Seconds

    listDwell(1) = 2#

    listDwell(2) = 0.5

    listlength = 3     ' Points

    For nChannel = 1 To nChannelNumber

        ' Get channel's model number

        errStatus = agN67xx_getSystemModuleName(vi, nChannel, moduleName)

        check vi, errStatus

        Debug.Print "agN67xx_getSystemModuleName(" & CStr(nChannel) & ") > " & moduleName

        ' Get channel's option string

        errStatus = agN67xx_getSystemModuleOption(vi, nChannel, optionName)

        check vi, errStatus

        Debug.Print "agN67xx_getSystemModuleOption(" & CStr(nChannel) & ") > " & optionName

        If (InStr(moduleName, "N6761A") > 0 Or InStr(moduleName, "N6762A") > 0 Or _

            (InStr(moduleName, "N6751A") > 0 And InStr(optionName, "Opt 054") > 0) Or _

            (InStr(moduleName, "N6752A") > 0 And InStr(optionName, "Opt 054") > 0)) Then

            errStatus = agN67xx_setTriggerMode(vi, nChannel, AGN67XX_VOLTAGE, AGN67XX_MODE_LIST)

            check vi, errStatus

            errStatus = agN67xx_setTriggerMode(vi, nChannel, AGN67XX_CURRENT, AGN67XX_MODE_LIST)

            check vi, errStatus

            errStatus = agN67xx_transientListPoints(vi, nChannel, listlength, listVoltage(0), listCurrent(0), listDwell(0))

            check vi, errStatus

            errStatus = agN67xx_setOutputState(vi, nChannel, 1, 1)

            check vi, errStatus

            ' Enables the output transient system to receive triggers

            errStatus = agN67xx_transientTrigInitiate(vi, nChannel)

            check vi, errStatus

            ' Triggers the output immediately

            errStatus = agN67xx_transientTrigImmediate(vi, nChannel)

            check vi, errStatus

        End If

    Next nChannel

    errStatus = agN67xx_close(vi)

    check vi, errStatus

End Sub

Private Sub check(vi As Long, errStatus As Long)

    Dim message As String * 256

    If (errStatus <> 0) Then                            ' Checking errors

        errStatus = agN67xx_error_message(vi, errStatus, message)  ' This functions returns the error message

        errStatus = MsgBox(message, vbCritical + vbOKOnly, "Error")

    End If

End Sub


Programming the Digital I/O Functions

External Trigger

Each of the three pins can be configured as either trigger inputs or trigger outputs. The polarity of the pins can also be configured. When you program trigger polarity, POSitive means a rising edge and NEGative means a falling edge.

To select the trigger input function for pin 1, the trigger output function for pin 2, and the trigger polarity for both, use:

agN67xx_configureIOPort(instrumentHandle, AGN67XX_DIGITAL_PIN1, AGN67XX_PIN_FUNCTION_TRIG_IN, AGN67XX_PIN_FUNCTION_POSITIVE);

agN67xx_configureIOPort(instrumentHandle, AGN67XX_DIGITAL_PIN2, AGN67XX_PIN_FUNCTION_TRIG_OUT, AGN67XX_PIN_FUNCTION_POSITIVE);

Fault Output

Pins 1 and 2 can be configured as a fault-output pair. Pin 1 becomes the fault output. Pin 2 becomes the common and does not need to be configured. The polarity of pin 1 can also be configured. To program these pins as a fault-output pair, with positive polarity, use:

agN67xx_configureIOPort(instrumentHandle, AGN67XX_DIGITAL_PIN1, AGN67XX_PIN_FUNCTION_FAULT, AGN67XX_PIN_FUNCTION_POSITIVE);

Inhibit Input

Pin 3 can be configured as an inhibit input. Pin 8 is the common. The polarity of pin 3 can also be configured. To program pin 3 as an Inhibit Input with positive polarity, use:

agN67xx_configureIOPort(instrumentHandle, AGN67XX_DIGITAL_PIN3, AGN67XX_PIN_FUNCTION_INHIBIT, AGN67XX_PIN_FUNCTION_POSITIVE);

After you have configured pin 3 as the remote inhibit input, you must also configure the operating mode of the Inhibit signal. The inhibit signal can be latched or live. When latched, the outputs will remain disabled after an inhibit signal is received. When live, the outputs will follow the state of the Inhibit input. The Inhibit operating mode is stored in non-volatile memory.

agN67xx_setOutputInhibitMode(instrumentHandle, AGN67XX_INHIBIT_MODE_LIVE);

Digital I/O

Each of the three pins can be configured as general-purpose digital inputs and outputs. The polarity of the pins can also be configured. To program the pin function, use

agN67xx_configureIOPort(instrumentHandle, pinNumber, AGN67XX_PIN_FUNCTION_DIO, AGN67XX_PIN_FUNCTION_POSITIVE);

When sending data to the digital pins, use the digital pin - to - bit assignments shown in the following table.

Pin	Bit
Pin 1	0
Pin 2	1
Pin 3	2
Pin 4	3
Pin 5	4
Pin 6	5
Pin 7	6
Pin 8	not programmable
The following example sends digital data to the IO port that programs pins 1, 2, and 3 true:

agN67xx_setDigitalPort(instrumentHandle, 7);

Digital Input

Each of the seven pins can be configured as digital input only. The polarity of the pins can also be configured. To program the pin function as digital input, use

agN67xx_configureIOPort(instrumentHandle, pinNumber, AGN67XX_PIN_FUNCTION_DINPUT, AGN67XX_PIN_FUNCTION_POSITIVE);

To read the digital pin data, use

ViReal64 pindata

agN67xx_getDigitalPort(instrumentHandle, &pindata);


Programming the Digitizer

Adjust the Measurement Sample Rate

The following figure illustrates the relationship between measurement samples (or points), and the time interval between samples in a typical measurement.

Measurement Sample Parameters

Ripple rejection is a function of the number of cycles of the ripple frequency contained in the acquisition window. More cycles in the acquisition window results in better ripple rejection. You can vary the measurement data sampling rate using the following commands:

For example, to set the time interval to 60 microseconds per sample with 4096 samples, use:

agN67xx_setSweepParams(instrumentHandle, channelNumber, 60E-6, 4096, 0);

Note:	The time interval is rounded to the nearest 20.48µs interval, which is 61.44µs.

Acquire Pre-trigger Data

The measurement system lets you capture data before, after, or at the trigger signal. As shown in the following figure, you can move the block of data being read into the acquisition buffer with reference to the trigger. This allows pre- or post-trigger data sampling.

Pre-event and Post-event Triggering

For example, to offset the beginning of the measurement relative to the acquisition trigger by 100 points, use:

agN67xx_setSweepParams(instrumentHandle, channelNumber, 60E-6, 4096, -100);

With a negative offset, values at the beginning of the buffer represent samples taken prior to the trigger. When the value is 0, all values are taken after the trigger. Values greater than 0 can be used to program a delay time from the receipt of the trigger until the values entered into the buffer are valid. (Delay time = offset x sample period).

Note:	If, during a pre-trigger data acquisition, a trigger occurs before the pre-trigger data count is completed, the measurement system ignores this trigger. This will prevent the completion of the measurement if another trigger is not generated.

Specify a Window Function

Windowing is a signal conditioning process that reduces the error in average measurements made in the presence of periodic signals and noise. Two window functions are available: Rectangular and Hanning. At power-on, the  measurement window is Rectangular.

The Rectangular window calculates average measurements without any signal conditioning. However, in the presence of periodic signals such ac line ripple, a Rectangular window can introduce errors when calculating average measurements. This can occur when a non-integral number of cycles of data has been acquired due to the last partial cycle of acquired data.

One way of dealing with AC line ripple is to use a Hanning window. The Hanning window applies a cos4 weighting function to the data when calculating average measurements.  This attenuates the AC noise in the measurement window. The best attenuation is achieved when at least three or more waveform cycles are in the measurement.

To select a window function, use:

agN67xx_setMeasurementWindow(instrumentHandle, channelNumber, AGN67XX_WINDOW_HANNING);

Retrieve Measurement Array Data

Array queries return all values in the voltage and current measurement buffer. No averaging is applied, only raw data is returned from the buffer. The following commands initiate and trigger a measurement and return the measurement array. Note that you must first dimension an array before you use these commands.

agN67xx_measureVoltArray(instrumentHandle, channelNumber, numReadings, voltArray);

agN67xx_measureCurrArray(instrumentHandle, channelNumber, numReadings, currArray);

Once a measurement finishes, you may wish to retrieve the array data without initiating a new measurement. Use FETCh queries to return the array data from the last measurement.. Fetch queries do not alter the data in the measurement buffer. The commands are:

ViReal64 voltResult

ViReal64 currResult

agN67xx_measureVolt(instrumentHandle, channelNumber, &voltResult);

agN67xx_measureCurr(instrumentHandle, channelNumber, &currResult);

If a FETCh query is sent before the measurement is started or before it is finished, the response will be delayed until the measurement trigger occurs and the acquisition completes.  This may tie up the computer if the measurement trigger does not occur immediately.


Programming the Ouptut - C/C++ Example
Programming the Output - C/C++ Example

/***************************************************************************************/

/*  Copyright (C) 2004 Agilent Technologies Company                          	      */

/*--------------------------------------------------------------------------*/

/* Example program for N6700A Dynamic Measurement DC Source P&P driver         */

/* Revision: A.00.00	      */

/*	      */

/* This program demonstrates how to communicate with the N67xx Modular Power  */

/* System using the VXI Plug&Play driver.                                                              */

/***************************************************************************************/

/* This example illustrates how to trigger output changes and trigger measurements */

/* over the bus. The triggered measurement is then read back.	       */

#include <visa.h>

#include <stdio.h>   /* prototype  for printf */

#include <string.h>	 /* prototype for strcpy() */

#include <stdlib.h>	 /* prototype for exit() */

#include <time.h>	 /* prototype for clock() */

#include "agN67xx.h"

void check (ViSession instrumentHandle, ViStatus errStatus) ;

void sleep(clock_t wait);

ViStatus main(void)

{

ViSession	vi;	/* Instrument Handle */

ViStatus	errStatus;	/* Error Status */

ViInt16	nChannel;	/* Working channel */

ViInt16	nChannelNumber;	/* Total installed channels */

int	i,j;

ViChar	ModuleName[30];

ViChar	OptionName[30];

ViReal64	voltageRange,voltage;

ViReal64	current;

ViReal64	voltageTriggerlevel;

ViInt16	FetchSize;

ViReal64	voltageArray[5];

/* Open the instrument for Communication */

/* The GPIB's address can find by front pannel menu("System\IO\GPIB"). */

errStatus = agN67xx_init("GPIB0::5::INSTR", VI_TRUE, VI_TRUE, &vi) ;

/* For USB Port */

/* The USB's resource string can find by front pannel menu("System\IO\USB\Identification") */

// errStatus = agN67xx_init("USB0::2391::3079::US00000208::INSTR", VI_TRUE, VI_TRUE, &vi);

/* For Lan Port	*/

/* The LAN's resource string can find by front pannel menu("System\IO\LAN\Config\Name"). */

// errStatus = agN67xx_init("TCPIP0::A-N6701A-00208::INSTR", VI_TRUE, VI_TRUE, &vi);

check (vi,errStatus);

/* Perform a soft reset */

errStatus = agN67xx_reset(vi) ;

check (vi,errStatus);

/* Enable error checking to be done at the end of every function call */

errStatus = agN67xx_errorQueryDetect(vi, VI_TRUE);

check(vi,errStatus);

/* Get how many installed channels */

errStatus = agN67xx_getChannels(vi, &nChannelNumber);

check (vi, errStatus);

for(i = 1; i <= nChannelNumber; i++)

{

nChannel = i;

/* Get channel's model number */

errStatus = agN67xx_getSystemModuleName(vi, nChannel,ModuleName);

check (vi, errStatus);

printf ("agN67xx_getSystemModuleName (@%d) > %s\n",nChannel,ModuleName);

/* Get channel's option string */

errStatus = agN67xx_getSystemModuleOption(vi, nChannel,OptionName);

check (vi, errStatus);

printf ("agN67xx_getSystemModuleOption (@%d) > %s\n",nChannel,OptionName);

/* The List features applies to Models N6761A, N6762A, and Models N6751A, N6752A. with Test Extensions Option 054.*/

if( strcmp(ModuleName,"N6761A") == 0 || strcmp(ModuleName,"N6762A") == 0 ||

(strcmp(ModuleName,"N6751A") == 0 && strcmp(OptionName,"Opt 054") < 0) ||

(strcmp(ModuleName,"N6752A") == 0 && strcmp(OptionName,"Opt 054") < 0))

{

/* Set the voltage and current parameters */

voltageRange = 51.0;	/* Volt */

voltage = 5.0;	/* Volt */

voltageTriggerlevel = 10.0;	/* Volt */

FetchSize = 5;	/* points */

/* Get the maximum current */

errStatus = agN67xx_queryCurrentLimitMax(vi, nChannel,&current);

check (vi, errStatus);

/* Set the voltage range and level */

errStatus = agN67xx_outputVoltageLevel(vi, nChannel, voltageRange, voltage);

check (vi, errStatus);

errStatus = agN67xx_outputCurrentLimit(vi, nChannel,current, current/2.0);

check (vi, errStatus);

errStatus = agN67xx_setTransientStepTrigLevel(vi, nChannel, AGN67XX_VOLTAGE, voltageTriggerlevel);

check (vi,errStatus);

errStatus = agN67xx_setOutputState(vi, nChannel, VI_TRUE, VI_TRUE);

check (vi, errStatus);

errStatus = agN67xx_setTransientTrigSource(vi, nChannel, AGN67XX_TRIGGER_SOURCE_BUS);

check (vi, errStatus);

errStatus = agN67xx_measurementConfigure(vi, nChannel, AGN67XX_VOLTAGE, 0, FetchSize, 0.0025);

check (vi, errStatus);

errStatus = agN67xx_setMeasurementTrigSource(vi, nChannel, AGN67XX_TRIGGER_SOURCE_BUS);

check (vi, errStatus);

/* Enables the output transient system to receive triggers */

errStatus = agN67xx_transientTrigInitiate(vi, nChannel);

check (vi, errStatus);

/* Enables the measurement system to receive triggers */

errStatus = agN67xx_measurementTrigInitiate(vi, nChannel);

check (vi, errStatus);

/* Triggers the output immediately */

errStatus = agN67xx_transientTrigImmediate(vi, nChannel);

check (vi, errStatus);

sleep(20);	/* wait 20 milli-seconds */

/* Triggers the measurement immediately */

errStatus = agN67xx_measurementTrigImmediate(vi, nChannel);

check (vi, errStatus);

/* read back the voltage points */

errStatus = agN67xx_measurementFetchArray(vi, nChannel, AGN67XX_VOLTAGE, FetchSize, voltageArray);

check (vi, errStatus);

/* print out the array of data */

for (j =0; j < FetchSize; j++)

printf("Element %d = %f \n", j+1, voltageArray[j]);

}

}

    /* Close the instrument session */

    agN67xx_close(vi);

    printf ( "PROGRAM COMPLETED\n");

    printf("Press Enter key to continue...\n");

    getchar();

    return VI_SUCCESS ;

}

void check (ViSession instrumentHandle, ViStatus errStatus)

{

/* variables for error code and message */

ViInt32 inst_err;

ViChar err_message[256];

/* VI_SUCCESS is 0 and is defined in VISATYPE.h */

if(VI_SUCCESS > errStatus)

{

/* send a device clear - to ensure communication with the instrument */

agN67xx_dcl(instrumentHandle);

/* AGN67XX_INSTR_ERROR_DETECTED is defined in agN67xx.h */

if(AGN67XX_INSTR_ERROR_DETECTED == errStatus)

{

/* query the instrument for the error */

agN67xx_error_query(instrumentHandle, &inst_err, err_message);

/* display the error */

printf("Instrument Error : %ld, %s\n", inst_err, err_message);

}

else	/* driver error */

{

/* get the driver error message */

agN67xx_error_message(instrumentHandle, errStatus, err_message);

/* display the error */

printf("Driver Error : %ld, %s\n", errStatus, err_message);

}

   /* optionally reset the instrument, close the instrument handle */

   agN67xx_reset(instrumentHandle);

   agN67xx_close(instrumentHandle);

   printf("Press Enter key to continue...\n");

   getchar();

   exit(-1);

}

}

void sleep(clock_t wait)

{

   clock_t goal;

   goal = wait + clock();

   while( goal > clock() )

      ;

}


Programming the Output

Set the Output Voltage

The output voltage is controlled with the agN67xx_setVolt function. For example, to set the output voltage to 25 volts, use:

agN67xx_setVolt(instrumentHandle, channelNumber, AGN67XX_VOLT_IMM, 25.0);

The maximum output voltage that can be programmed can be queried with:

ViReal64 voltmax

agN67xx_getVolt(instrumentHandle, AGN67XX_VOLT_Q_MAX, &voltmax);

For output modules with multiple ranges, the range with the best resolution is automatically selected when you enter the output voltage value.

Set the Output Current

All models have a programmable current function. For example, to limit the output current to 2 amps, use:

agN67xx_setCurr(instrumentHandle, channelNumber, AGN67XX_CURR_IMM, 2.0);

If the load attempts to draw more current than the programmed limit, the output voltage is reduced to keep the current within the limit.

The maximum output current that can be programmed can be queried with:

ViReal64 currmax

agN67xx_getCurr(instrumentHandle, channelNumber, AGN67XX_CURR_Q_MAX, &currmax)

For output modules with multiple ranges, the range with the best resolution is automatically selected when you enter the output current value.

Both Voltage and Current

Use the following function to program both voltage and current:

agN67xx_outputVoltCurr(instrumentHandle, channelNumber, voltageLevel, currentLimit);

Use the following function to program both voltage and current on output 2. This function sets the voltage to 15 volts and the current to 5 amps.

agN67xx_outputVoltCurr(instrumentHandle, 2, 15.0, 5.0);

Enable the Output

To enable the output, use the function:

agN67xx_setOutputState(instrumentHandle, channelNumber, VI_TRUE, VI_TRUE);

If your instrument has an optional output relay, the second TRUE parameter enables the relay.

Sequence Multiple Outputs

You can specify a turn-on and turn-off delay to control the power-up and power-down sequencing of the output channels. Note that you must program a delay time for all FOUR output channels even if they are not installed in your mainframe or even if you are not specifying a delay time for them.

To program a 50 millisecond turn-on delay for output 1 and a 100 millisecond turn-on delay for output 2:

agN67xx_configureOnSequence(instrumentHandle, 0.05, 0.1, 0.0, 0.0);

To program a 200 millisecond turn-off delay for outputs 3 and 4:

agN67xx_configureOffSequence(instrumentHandle, 0.0, 0.0, 0.2, 0.2);

To turn-on (enable) or turn-off (disable) all the outputs at the same time, use the following command. The turn-on and turn-off delays apply after this command is executed.

agN67xx_outputEnableAll(instrumentHandle, VI_TRUE);

Set the Over-voltage protection

The output channel can be programmed to turn off its output if the output voltage exceeds a preset peak voltage limit. For example, to program the instrument to turn its output off if the output voltage exceeds 27 volts use:

agN67xx_setVolt(instrumentHandle, channelNumber, AGN67XX_VOLT_OVP, 27.0);

To clear the protection function and restore normal operation, first remove the condition that caused the over-voltage, then clear the protection fault as follows:

agN67xx_resetOutputProtection(instrumentHandle, channelNumber);

Set the Over-current Protection

The output channel can be programmed to turn off its output if the output current reaches its programmed current limit. The current limit setting must have been previously programmed with the agN67xx_setCurr function. To enable the over-current protection (OCP), use:

agN67xx_setOcpParams(instrumentHandle, VI_TRUE, 0.001);

Note that a delay of 1 millisecond is programmed in this example. This prevents momentary current limit conditions caused by programmed output changes from tripping the over-current protection.

To clear the protection function and restore normal operation, first remove the condition that caused the over-current, then clear the protection fault as follows:

agN67xx_resetOutputProtection(instrumentHandle, channelNumber);


Programming the Output - Visual BASIC Example

Option Explicit     'All variables MUST be declared

Private Sub setButton_Click()

    'These variable are neccessary to initialize the VISA system.

    Dim vi As Long

    Dim errStatus As Long

    Dim Output As Integer

    Dim nChannel As Integer

    Dim nChannelNumber As Integer

    Dim FrameName As String * 256

    Dim FrameSerialNumber As String * 256

    Dim firmwareNumber As String * 256

    Dim moduleName As String * 256

    Dim optionName As String * 256

    Dim serialNumber As String * 256

    Dim voltage, current As Double

    Dim measvoltage, meascurrent As Double

    '  Open the instrument for Communication

    '  The GPIB's address can find by front pannel menu("System\IO\GPIB").

    errStatus = agN67xx_init("GPIB0::5::INSTR", 1, 0, vi)

    ' For USB port

    ' The USB's resource string can find by front pannel menu("System\IO\USB\Identification") */

    ' errStatus = agN67xx_init("USB0::2391::3079::US00000208::INSTR", 1, 0, vi)

    ' For Lan Port

    ' The LAN's resource string can find by front pannel menu("System\IO\LAN\Config\Name").

    ' errStatus = agN67xx_init("TCPIP0::A-N6701A-00208::INSTR", 1, 0, vi)

    check vi, errStatus

    ' Perform a soft reset

    errStatus = agN67xx_reset(vi)

    check vi, errStatus

    ' Enable error checking to be done at the end of every function call

    errStatus = agN67xx_errorQueryDetect(vi, VI_TRUE)

    check vi, errStatus

    ' Get how many installed channels

    errStatus = agN67xx_getChannels(vi, nChannelNumber)

    check vi, errStatus

    ' Get the mainframe's model number

    errStatus = agN67xx_getSystemName(vi, FrameName)

    check vi, errStatus

    Debug.Print "Get System Name() > " & FrameName

    ' Get the mainframe's serial number

    errStatus = agN67xx_getSystemSerialNumber(vi, FrameSerialNumber)

    check vi, errStatus

    Debug.Print "Get System SerialNumber() > " & FrameSerialNumber

    ' Get the firmware number

    errStatus = agN67xx_getSystemFirmwareNumber(vi, firmwareNumber)

    check vi, errStatus

    Debug.Print "Get System Firmware Number () > " & firmwareNumber

    For nChannel = 1 To nChannelNumber

        ' Get channel's model number

        errStatus = agN67xx_getSystemModuleName(vi, nChannel, moduleName)

        check vi, errStatus

        Debug.Print "agN67xx_getSystemModuleName(" & CStr(nChannel) & ") > " & moduleName

        ' Get channel's option string

        errStatus = agN67xx_getSystemModuleOption(vi, nChannel, optionName)

        check vi, errStatus

        Debug.Print "agN67xx_getSystemModuleOption(" & CStr(nChannel) & ") > " & optionName

        ' Get channel's serial number

        errStatus = agN67xx_getSystemModuleSerialNumber(vi, nChannel, serialNumber)

        check vi, errStatus

        Debug.Print "agN67xx_getSystemModuleSerialNumber(" & CStr(nChannel) & ") > " & serialNumber

        ' Set the voltage and current parameters

        voltage = 1# * nChannel

        current = 0.1 * nChannel

        ' Set output voltage and current levels, turn output on

        errStatus = agN67xx_outputVoltCurr(vi, nChannel, voltage, current)

        check vi, errStatus

        ' Query applied Voltage and Current

        errStatus = agN67xx_getVolt(vi, nChannel, AGN67XX_VOLT_IMM, voltage)

        check vi, errStatus

        errStatus = agN67xx_getCurr(vi, nChannel, AGN67XX_CURR_IMM, current)

        check vi, errStatus

        Debug.Print "Applied settings: at " & CStr(nChannel) & " channel"

        Debug.Print " Voltage = " & CStr(voltage) & " V" & " Current = " & CStr(current) & " A"

        ' Measure the dc voltage level at the output terminals

        errStatus = agN67xx_measureVolt(vi, nChannel, measvoltage)

        check vi, errStatus

        ' Measure the dc current level at the output terminals

        errStatus = agN67xx_measureCurr(vi, nChannel, meascurrent)

        check vi, errStatus

        Debug.Print "Measured values: at " & CStr(nChannel) & " channel"

        Debug.Print " Voltage = " & CStr(measvoltage) & " V" & " Current = " & CStr(meascurrent) & " A"

    Next nChannel

    errStatus = agN67xx_close(vi)

    check vi, errStatus

End Sub

Private Sub check(vi As Long, errStatus As Long)

    Dim message As String * 256

    If (errStatus <> 0) Then                            ' Checking errors

        errStatus = agN67xx_error_message(vi, errStatus, message)  ' This functions returns the error message

        errStatus = MsgBox(message, vbCritical + vbOKOnly, "Error")

    End If

End Sub


Programming the Status Registers

You can use status register programming to determine the operating condition of the power system at any time.  For example, you may program the power system to generate an interrupt (assert SRQ) when an event such as a current limit occurs. When the interrupt occurs, your program can then act on the event in the appropriate fashion.

The following table defines the status bits. The Standard Event, Status Byte, and Service Request Enable registers and the Output Queue perform standard GPIB functions as defined in the IEEE 488.2 Standard Digital Interface for Programmable Instrumentation. The Operation Status and Questionable Status registers implement functions that are specific to an output channel.

Refer to the *RST command description in the User’s Guide for the power-on conditions of the status registers.

Bit Configurations of  Status Registers

Bit	Signal	Value	Meaning
0 1 2 3 4	CV CC OFF WTG_meas WTG_trans	1 2 4 8 16	Operation Status Group The output is in constant voltage mode The output is in constant current mode The output is programmed off The measurement system is waiting for a trigger  The transient system is waiting for a trigger
0 1 2 3 4 5 9 10 11	OV OC PF CP+ OT CP- INH UNR PROT	1 2 4 8 16 32 512 1024 2048	Questionable Status Group The overvoltage protection has tripped The overcurrent protection has tripped The output is disabled by a power-fail condition The output is limited by the positive power limit The overtemperature protection has tripped The output is limited by the negative power limit The output is inhibited by an external signal The output is unregulated The output is disabled because it is coupled to a protection condition that occurred on another channel
0 2 3 4 5 7	OPC QYE DDE EXE CME PON	1 4 8 16 32 128	Standard Event Status Group Operation complete Query error Device-dependent error Execution error Command error Power-on has occurred
2 3 4 5 6 7	ERR QUES MAV ESB MSS RQS OPER	4 8 16 32 64 128	Status Byte and Service Request Enable Registers Error queue not empty Questionable status summary bit Message Available summary bit Event Status Summary bit Master Status Summary bit Request Service bit Operation status summary bit
Operation Status Group

The Operation Status registers record signals that occur during normal operation. The outputs of the Operation Status register group  are logically-ORed into the Operation summary bit (7) of the Status Byte register. The functions to program the Operation Status registers are:

Function	Action
agN67xx_operCond_Q();	reads the Operation Status Condition register.
agN67xx_operEvent_Q();	reads and clears the Operation Status Event register.
agN67xx_setEnableReg();	enables specific bits in the Operation Status Enable register.
agN67xx_cmd();	used to send SCPI status commands to program the NPR and PTR registers.
Questionable Status Group

The Questionable Status registers record signals that indicate abnormal operation of the output channel. The outputs of the Questionable Status group are logically-ORed into the Questionable summary bit (3) of the Status Byte register. The functions to program the Questionable Status registers are:

Function	Action
agN67xx_quesCond_Q();	reads the Questionable Status Condition register.
agN67xx_quesEvent_Q();	reads and clears the Questionable Status Event register.
agN67xx_setEnableReg();	enables specific bits in the Questionable Status Enable register.
agN67xx_cmd();	used to send SCPI status commands to program the NPR and PTR registers.
Standard Event Status Group

This group consists of an Event register and an Enable register that are programmed by Common commands. The Standard Event event register latches events relating to instrument communication status. It is a read-only register that is cleared when read. The Standard Event enable register functions similarly to the enable registers of the Operation and Questionable status groups.

Function	Action
agN67xx_setEnableReg();	enables specific bits in the Standard Event Enable register.
agN67xx_stdEvent_Q();	reads and clears the Standard Event Event register.
agN67xx_cmd();	used to send the SCPI *PSC ON command to clear the Standard Event Enable register at power-on.
The PON (Power On) Bit

The PON bit in the Standard Event event register is set whenever the power system is turned on. The most common use for PON is to generate an SRQ at power-on following an unexpected loss of power. To do this, bit 7 of the Standard Event enable register must be set so that a power-on event registers in the ESB (Standard Event Summary Bit), bit 5 of the Service Request Enable register must be set to permit an SRQ to be generated, and *PSC OFF must be sent. The functions to accomplish these conditions are:

Function	Action
agN67xx_setEnableReg();	used to send a value of 128 to enable Standard Event Enable register bit #7.
agN67xx_cmd();	used to send the SCPI *PSC OFF command. also used to send an *SRE 32 command to enable bit #5 of the Service Request Enable register.
Status Byte Register

This register summarizes the information from all other status groups as defined in the IEEE 488.2 Standard Digital Interface for Programmable Instrumentation.

Function	Action
agN67xx_readStatusByte_Q();	reads the data in the register but does not clear it (returns MSS in bit 6)
serial poll	clears RQS inside the register and returns it in bit position 6 of the response.
The MSS Bit

This is a real-time (unlatched) summary of all Status Byte register bits that are enabled by the Service Request Enable register. MSS is set whenever the power system has one or more reasons for requesting service. agN67xx_readStatusByte_Q() reads the MSS in bit position 6 of the response but does not clear any of the bits in the Status Byte register.

The RQS Bit

The RQS bit is a latched version of the MSS bit. Whenever the power system requests service, it sets the SRQ interrupt line true and latches RQS into bit 6 of the Status Byte register. When the controller does a serial poll, RQS is cleared inside the register and returned in bit position 6 of the response. The remaining bits of the Status Byte register are not disturbed.

The MAV bit and Output Queue

The Output Queue is a first-in, first-out (FIFO) data register that stores power system-to-controller messages until the controller reads them. Whenever the queue holds one or more bytes, it sets the MAV bit (4) of the Status Byte register.


Required Files
Directory Structure

Under Windows

The setup program which installs the Agilent Technologies N6700 instrument driver creates the VXIPNP directory if it does not already exist.  The structure for the Windows 98/NT/2000/XP VXIPNP subdirectory tree is:

Windows 98/NT/2000/XP

In the directory examples Agxxxx is a place holder for the actual directory named agN67xx containing the instrument driver.  There would a directory for each instrument driver.

Under HP-UX

The VXIplug&play specification requires that the environment variable VXIPNPPATH be defined in the /etc/profile file.  For HP-UX 10.01 and above the required value is /opt/vxipnp.

The base directory for each instrument is:

$VXIPNPPATH/hpux/<inst_name>

All shared library files with the .sl extension go in:

$VXIPNPPATH/hpux/bin

All .h files go in:

$VXIPNPPATH/hpux/include

All other HP-UX VISA files go in:

$VXIPNPPATH/hpux/hpvisa


Selecting Functions

The help file’s function reference lists the Agilent Technologies N6700 instrument driver functions alphabetically and hierarchically. There are four categories of functions based on their intended use.  The categories are: Application Functions, Subsystem Functions, Passthrough Functions and Utility Functions.

For details of which functions are in which category, see the Function Reference (Hierarchical).

The functions in each category are identified below. The example programs in this help file demonstrate most of the functions listed.

Application Functions

These functions do application level tasks.  They are designed to allow quick and easy access to common instrument measurement sequences.  The functionality they encapsulate should be applicable to the many common instrument measurement tasks.  They are instrument specific.

Subsystem Functions

These functions combine multiple SCPI commands into a single, functional operation.  They are designed to allow quick and easy access to common instrument command sequences.  The functionality they encapsulate should be applicable to a wide variety of functional tasks.  These functions are instrument specific.

Passthrough Functions

Passthrough functions pass SCPI commands directly to the instrument. These functions are used when there is not a driver function available to set / perform a particular operation. The passthrough functions include:

agN67xx_cmd	agN67xx_cmdInt32Arr_Q

agN67xx_cmdString_Q	agN67xx_cmdReal

agN67xx_cmdInt	agN67xx_cmdReal32_Q

agN67xx_cmdInt16_Q	agN67xx_cmdReal64_Q

agN67xx_cmdInt32_Q	agN67xx_cmdReal32Arr_Q

agN67xx_cmdInt16Arr_Q	agN67xx_cmdReal64Arr_Q

The Equivalent SCPI Commands topic contains a recommended mapping of SCPI commands to passthrough functions.

Utility Functions

Utility functions perform a variety of standard tasks. Some of the Agilent Technologies N6700’s utility functions include:

agN67xx_close	agN67xx_opc_Q

agN67xx_dcl	agN67xx_operCond_Q

agN67xx_error_message	agN67xx_operEvent_Q

agN67xx_error_query	agN67xx_readStatusByte_Q

agN67xx_errorQueryDetect	agN67xx_reset

agN67xx_errorQueryDetect_Q	agN67xx_revision_query

agN67xx_init	agN67xx_self_test

agN67xx_quesEvent_Q	agN67xx_timeOut

agN67xx_quesCond_Q	agN67xx_timeOut_Q


Synchronizing Digitizer Measurements

Select the Measurement Function to Trigger

Some models have two measurement converters, which allows simultaneous voltage and current measurements. If a model has only one converter and a triggered measurement is initiated, the parameter that it measures (either voltage or current) must be specified.

To trigger measurements on output modules that do not have simultaneous voltage and current measurement capability, select the measurement function as follows, where 0 selects the voltage measurement function and 1 selects the current measurement function:

agN67xx_setAcqSenseFunc(instrumentHandle, channelNumber, AGN67XX_VOLTAGE);

If a model has simultaneous voltage and current measurements capability, then BOTH voltage and current are acquired on any triggered measurement, regardless of the setting of the agN67xx_setAcqSenseFunction setting.

Select the Measurement Trigger Source

Unless you are using the front panel menu or an agN67xx_trigger function to trigger the measurement, you must select a measurement trigger source.

To select Bus triggers as the trigger source, use:

agN67xx_setMeasurementTrigSource(instrumentHandle, channelNumber, AGN67XX_TRIGGER_SOURCE_BUS);

To select a Digital pin (pin 1 in this example) as the trigger source, use:

agN67xx_setMeasurementTrigSource(instrumentHandle, channelNumber, AGN67XX_TRIGGER_SOURCE_PIN1);

where n is the pin number.

To select the Transient output of another channel (channel 1 in this example) as the trigger source:

agN67xx_setMeasurementTrigSource(instrumentHandle, channelNumber, AGN67XX_TRIGGER_SOURCE_TRAN1);

where n is the output channel that will generate the trigger signal.

Initiate the Measurement Trigger System

When the power system is turned on, the trigger system is in the idle state. In this state, the trigger system is disabled, ignoring all triggers. The agN67xx_arm() function enables the measurement system to receive triggers.

agN67xx_arm(instrumentHandle, channelNumber, AGN67XX_ARM_MEASUREMENT);

After a trigger is received and the action completes, the trigger system will return to the Idle state.  Thus it will be necessary to initiate the measurement system each time a triggered measurement is desired.

Trigger the Measurement

The trigger system is waiting for a trigger signal in the initiated state.  You can immediately trigger the measurement as follows:

agN67xx_trigger(instrumentHandle, channelNumber, AGN67XX_TRIG_MEASUREMENT);

agN67xx_trg(instrumentHandle);

As previously discussed, a trigger can also be generated by another output channel or by a trigger signal applied to an input pin on the digital port connector. If any of these systems are configured as the trigger source, the instrument will wait indefinitely for the trigger signal. If the trigger does not occur, you must manually return the trigger system to the idle state.

The following command returns the measurement trigger system to the idle state:

agN67xx_abort(instrumentHandle, channelNumber, AGN67XX_TRIG_MEASUREMENT);


Synchronizing Output Steps

Enable the Output to Respond to Triggers

First, you must enable the output channel to respond to trigger commands. Unless an output is enabled to respond to triggers, nothing will happen even if you have programmed a trigger level and generated a trigger for the output.

To enable the voltage and current functions to respond to triggers, use:

agN67xx_setTriggerMode(instrumentHandle, channelNumber, AGN67XX_VOLTAGE, AGN67XX_MODE_STEP);

agN67xx_setTriggerMode(instrumentHandle, channelNumber, AGN67XX_CURRENT, AGN67XX_MODE_STEP);

In Step mode, the triggered value becomes the immediate value when the trigger is received. In Fixed mode, trigger signals are ignored; the immediate values remain in effect when a trigger is received.

Setting the Voltage or Current Trigger Levels

To program output trigger levels, you must first specify a voltage or current trigger level that the output will go to once a trigger signal is received. Use the following functions to set the output voltage or current trigger levels:

agN67xx_setVolt(instrumentHandle, channelNumber, AGN67XX_VOLT_TRIG, 30.0);

agN67xx_setCurr(instrumentHandle, channelNumber, AGN67XX_CURR_TRIG, 5.0);

Note:	If you have a model that has multiple ranges, the selected triggered voltage and current settings must be within the same range that the output channel is presently operating in.

Select the Transient Trigger Source

Unless you are using the front panel menu or an agN67xx_trigger function to trigger the output, you must select a source from which the trigger is generated.

To select Bus triggers as the trigger source, use:

agN67xx_setTransientTrigSource(instrumentHandle, channelNumber, AGN67XX_TRIGGER_SOURCE_BUS);

To select a Digital pin as the trigger source, use:

agN67xx_setTransientTrigSource(instrumentHandle, channelNumber, AGN67XX_TRIGGER_SOURCE_PIN3);

where pin number 3 is specified.

To select the Transient output of another channel as the trigger source:

agN67xx_setTransientTrigSource(instrumentHandle, channelNumber, AGN67XX_TRIGGER_SOURCE_TRAN1);

where output channel 1 is selected to provide the trigger signal.

Initiate the Transient Trigger System

When the power system is turned on, the trigger system is in the idle state.  In this state, the trigger system ignores all triggers. The agN67xx_arm() function moves the trigger system from the Idle state to the Initiated state.  This enables the power system to receive triggers.  To arm the unit for a single triggered action, use:

agN67xx_arm(instrumentHandle, channelNumber, AGN67XX_ARM_OUTPUT_ONCE);

After a trigger is received and the action completes, the trigger system will return to the Idle state.  Thus it will be necessary to initiate the system each time a trigger is desired.

To keep a trigger system initiated for multiple actions without having to send an agN67xx_arm() function for each trigger, use:

agN67xx_arm(instrumentHandle, channelNumber, AGN67XX_ARM_OUTPUT_CONTINUOUS);

Trigger the Output

The trigger system is waiting for a trigger signal in the initiated state.  You can immediately trigger the output by sending one of the following functions over the GPIB bus:

agN67xx_trigger(instrumentHandle, channelNumber, AGN67XX_TRIG_TRANSIENT);

agN67xx_trg(instrumentHandle);

When a trigger is received, the triggered functions are set to their programmed trigger levels. When the triggered actions are completed, the trigger system returns to the idle state.

As previously discussed, a trigger can also be generated by another output channel or by a trigger signal applied to an input pin on the digital port connector. If any of these systems are configured as the trigger source, the instrument will wait indefinitely for the trigger signal. If the trigger does not occur, you must manually return the trigger system to the idle state.

The following command returns the trigger system to the idle state:

agN67xx_abort(instrumentHandle channelnumber, AGN67XX_TRIG_TRANSIENT);

Generating a Trigger Out Signal

Each output channel can generate trigger signals that can be used by other output channels, or routed to a pin on the digital port that has been configured as a trigger output (TOUT). Use the following command to program transient trigger signals that are generated when an output Step occurs.

agN67xx_setTransientStepTrigOut(instrumentHandle, channelNumber, VI_TRUE);


Triggering Output Steps and Measurements - C/C++ Example

/***************************************************************************************/

/*  Copyright (C) 2004 Agilent Technologies Company                          	      */

/*--------------------------------------------------------------------------*/

/* Example program for N6700A Dynamic Measurement DC Source P&P driver         */

/* Revision: A.00.00	      */

/*	      */

/* This program demonstrates how to communicate with the N67xx Modular Power  */

/* System using the VXI Plug&Play driver.                                                              */

/***************************************************************************************/

/* This example illustrates how to trigger output changes and trigger measurements */

/* over the bus. The triggered measurement is then read back.	       */

#include <visa.h>

#include <stdio.h>   /* prototype  for printf */

#include <string.h>	 /* prototype for strcpy() */

#include <stdlib.h>	 /* prototype for exit() */

#include <time.h>	 /* prototype for clock() */

#include "agN67xx.h"

void check (ViSession instrumentHandle, ViStatus errStatus) ;

void sleep(clock_t wait);

ViStatus main(void)

{

ViSession	vi;	/* Instrument Handle */

ViStatus	errStatus;	/* Error Status */

ViInt16	nChannel;	/* Working channel */

ViInt16	nChannelNumber;	/* Total installed channels */

int	i,j;

ViChar	ModuleName[30];

ViChar	OptionName[30];

ViReal64	voltageRange,voltage;

ViReal64	current;

ViReal64	voltageTriggerlevel;

ViInt16	FetchSize;

ViReal64	voltageArray[5];

/* Open the instrument for Communication */

/* The GPIB's address can find by front pannel menu("System\IO\GPIB"). */

errStatus = agN67xx_init("GPIB0::5::INSTR", VI_TRUE, VI_TRUE, &vi) ;

/* For USB Port */

/* The USB's resource string can find by front pannel menu("System\IO\USB\Identification") */

// errStatus = agN67xx_init("USB0::2391::3079::US00000208::INSTR", VI_TRUE, VI_TRUE, &vi);

/* For Lan Port	*/

/* The LAN's resource string can find by front pannel menu("System\IO\LAN\Config\Name"). */

// errStatus = agN67xx_init("TCPIP0::A-N6701A-00208::INSTR", VI_TRUE, VI_TRUE, &vi);

check (vi,errStatus);

/* Perform a soft reset */

errStatus = agN67xx_reset(vi) ;

check (vi,errStatus);

/* Enable error checking to be done at the end of every function call */

errStatus = agN67xx_errorQueryDetect(vi, VI_TRUE);

check(vi,errStatus);

/* Get how many installed channels */

errStatus = agN67xx_getChannels(vi, &nChannelNumber);

check (vi, errStatus);

for(i = 1; i <= nChannelNumber; i++)

{

nChannel = i;

/* Get channel's model number */

errStatus = agN67xx_getSystemModuleName(vi, nChannel,ModuleName);

check (vi, errStatus);

printf ("agN67xx_getSystemModuleName (@%d) > %s\n",nChannel,ModuleName);

/* Get channel's option string */

errStatus = agN67xx_getSystemModuleOption(vi, nChannel,OptionName);

check (vi, errStatus);

printf ("agN67xx_getSystemModuleOption (@%d) > %s\n",nChannel,OptionName);

/* The List features applies to Models N6761A, N6762A, and Models N6751A, N6752A. with Test Extensions Option 054.*/

if( strcmp(ModuleName,"N6761A") == 0 || strcmp(ModuleName,"N6762A") == 0 ||

(strcmp(ModuleName,"N6751A") == 0 && strcmp(OptionName,"Opt 054") < 0) ||

(strcmp(ModuleName,"N6752A") == 0 && strcmp(OptionName,"Opt 054") < 0))

{

/* Set the voltage and current parameters */

voltageRange = 51.0;	/* Volt */

voltage = 5.0;	/* Volt */

voltageTriggerlevel = 10.0;	/* Volt */

FetchSize = 5;	/* points */

/* Get the maximum current */

errStatus = agN67xx_queryCurrentLimitMax(vi, nChannel,&current);

check (vi, errStatus);

/* Set the voltage range and level */

errStatus = agN67xx_outputVoltageLevel(vi, nChannel, voltageRange, voltage);

check (vi, errStatus);

errStatus = agN67xx_outputCurrentLimit(vi, nChannel,current, current/2.0);

check (vi, errStatus);

errStatus = agN67xx_setTransientStepTrigLevel(vi, nChannel, AGN67XX_VOLTAGE, voltageTriggerlevel);

check (vi,errStatus);

errStatus = agN67xx_setOutputState(vi, nChannel, VI_TRUE, VI_TRUE);

check (vi, errStatus);

errStatus = agN67xx_setTransientTrigSource(vi, nChannel, AGN67XX_TRIGGER_SOURCE_BUS);

check (vi, errStatus);

errStatus = agN67xx_measurementConfigure(vi, nChannel, AGN67XX_VOLTAGE, 0, FetchSize, 0.0025);

check (vi, errStatus);

errStatus = agN67xx_setMeasurementTrigSource(vi, nChannel, AGN67XX_TRIGGER_SOURCE_BUS);

check (vi, errStatus);

/* Enables the output transient system to receive triggers */

errStatus = agN67xx_transientTrigInitiate(vi, nChannel);

check (vi, errStatus);

/* Enables the measurement system to receive triggers */

errStatus = agN67xx_measurementTrigInitiate(vi, nChannel);

check (vi, errStatus);

/* Triggers the output immediately */

errStatus = agN67xx_transientTrigImmediate(vi, nChannel);

check (vi, errStatus);

sleep(20);	/* wait 20 milli-seconds */

/* Triggers the measurement immediately */

errStatus = agN67xx_measurementTrigImmediate(vi, nChannel);

check (vi, errStatus);

/* read back the voltage points */

errStatus = agN67xx_measurementFetchArray(vi, nChannel, AGN67XX_VOLTAGE, FetchSize, voltageArray);

check (vi, errStatus);

/* print out the array of data */

for (j =0; j < FetchSize; j++)

printf("Element %d = %f \n", j+1, voltageArray[j]);

}

}

    /* Close the instrument session */

    agN67xx_close(vi);

    printf ( "PROGRAM COMPLETED\n");

    printf("Press Enter key to continue...\n");

    getchar();

    return VI_SUCCESS ;

}

void check (ViSession instrumentHandle, ViStatus errStatus)

{

/* variables for error code and message */

ViInt32 inst_err;

ViChar err_message[256];

/* VI_SUCCESS is 0 and is defined in VISATYPE.h */

if(VI_SUCCESS > errStatus)

{

/* send a device clear - to ensure communication with the instrument */

agN67xx_dcl(instrumentHandle);

/* AGN67XX_INSTR_ERROR_DETECTED is defined in agN67xx.h */

if(AGN67XX_INSTR_ERROR_DETECTED == errStatus)

{

/* query the instrument for the error */

agN67xx_error_query(instrumentHandle, &inst_err, err_message);

/* display the error */

printf("Instrument Error : %ld, %s\n", inst_err, err_message);

}

else	/* driver error */

{

/* get the driver error message */

agN67xx_error_message(instrumentHandle, errStatus, err_message);

/* display the error */

printf("Driver Error : %ld, %s\n", errStatus, err_message);

}

   /* optionally reset the instrument, close the instrument handle */

   agN67xx_reset(instrumentHandle);

   agN67xx_close(instrumentHandle);

   printf("Press Enter key to continue...\n");

   getchar();

   exit(-1);

}

}

void sleep(clock_t wait)

{

   clock_t goal;

   goal = wait + clock();

   while( goal > clock() )

      ;

}


Triggering Output Steps and Measurements - Visual BASIC Example

Option Explicit     'All variables MUST be declared

Private Sub setButton_Click()

    'These variable are neccessary to initialize the VISA system.

    Dim vi As Long

    Dim errStatus As Long

    Dim Output As Integer

    Dim nChannel As Integer

    Dim nChannelNumber As Integer

    Dim moduleName As String * 256

    Dim optionName As String * 256

    Dim VoltageRange, voltage, voltageTriggerlevel As Double

    Dim FetchSize As Integer

    Dim current As Double

    Dim voltageArray(5) As Double

    Dim j As Integer

    '  Open the instrument for Communication

    '  The GPIB's address can find by front pannel menu("System\IO\GPIB").

    errStatus = agN67xx_init("GPIB0::5::INSTR", 1, 0, vi)

    ' For USB port

    ' The USB's resource string can find by front pannel menu("System\IO\USB\Identification") */

    ' errStatus = agN67xx_init("USB0::2391::3079::US00000208::INSTR", 1, 0, vi)

    ' For Lan Port

    ' The LAN's resource string can find by front pannel menu("System\IO\LAN\Config\Name").

    ' errStatus = agN67xx_init("TCPIP0::A-N6701A-00208::INSTR", 1, 0, vi)

    check vi, errStatus

    ' Perform a soft reset

    errStatus = agN67xx_reset(vi)

    check vi, errStatus

    ' Enable error checking to be done at the end of every function call

    errStatus = agN67xx_errorQueryDetect(vi, VI_TRUE)

    check vi, errStatus

    ' Get how many installed channels

    Err = agN67xx_getChannels(vi, nChannelNumber)

    check vi, errStatus

    For nChannel = 1 To nChannelNumber

        ' Get channel's model number

        errStatus = agN67xx_getSystemModuleName(vi, nChannel, moduleName)

        check vi, errStatus

        Debug.Print "agN67xx_getSystemModuleName(" & CStr(nChannel) & ") > " & moduleName

        ' Get channel's option string

        errStatus = agN67xx_getSystemModuleOption(vi, nChannel, optionName)

        check vi, errStatus

        Debug.Print "agN67xx_getSystemModuleOption(" & CStr(nChannel) & ") > " & optionName

        If (InStr(moduleName, "N6761A") > 0 Or InStr(moduleName, "N6762A") > 0 Or _

            (InStr(moduleName, "N6751A") > 0 And InStr(optionName, "Opt 054") > 0) Or _

            (InStr(moduleName, "N6752A") > 0 And InStr(optionName, "Opt 054") > 0)) Then

            ' Set the voltage and current parameters

            VoltageRange = 51#    ' Volt

            voltage = 5#      ' Volt

            voltageTriggerlevel = 10# ' Volt

            FetchSize = 5  ' points

            ' Get the maximum current

            errStatus = agN67xx_queryCurrentLimitMax(vi, nChannel, current)

            check vi, errStatus

            ' Set the voltage range and level

            errStatus = agN67xx_outputVoltageLevel(vi, nChannel, VoltageRange, voltage)

            check vi, errStatus

            errStatus = agN67xx_outputCurrentLimit(vi, nChannel, current, current / 2#)

            check vi, errStatus

            errStatus = agN67xx_setTransientStepTrigLevel(vi, nChannel, AGN67XX_VOLTAGE, voltageTriggerlevel)

            check vi, errStatus

            errStatus = agN67xx_setOutputState(vi, nChannel, 1, 1)

            check vi, errStatus

            errStatus = agN67xx_setTransientTrigSource(vi, nChannel, AGN67XX_TRIGGER_SOURCE_BUS)

            check vi, errStatus

            errStatus = agN67xx_measurementConfigure(vi, nChannel, AGN67XX_VOLTAGE, 0, FetchSize, 0.0025)

            check vi, errStatus

            errStatus = agN67xx_setMeasurementTrigSource(vi, nChannel, AGN67XX_TRIGGER_SOURCE_BUS)

            check vi, errStatus

            ' Enables the output transient system to receive triggers

            errStatus = agN67xx_transientTrigInitiate(vi, nChannel)

            check vi, errStatus

            ' Enables the measurement system to receive triggers

            errStatus = agN67xx_measurementTrigInitiate(vi, nChannel)

            check vi, errStatus

            ' Triggers the output immediately

            errStatus = agN67xx_transientTrigImmediate(vi, nChannel)

            check vi, errStatus

            Sleep (20) ' wait 20 milli-seconds

            ' Triggers the measurement immediately

            errStatus = agN67xx_measurementTrigImmediate(vi, nChannel)

            check vi, errStatus

            ' read back the voltage points

            errStatus = agN67xx_measurementFetchArray(vi, nChannel, AGN67XX_VOLTAGE, FetchSize, voltageArray(0))

            check vi, errStatus

            ' print out the array of data

            For j = 1 To FetchSize

                Debug.Print "Element " & CStr(j) & ": " & voltageArray(j - 1) & " V"

            Next j

        End If

    Next nChannel

    errStatus = agN67xx_close(vi)

    check vi, errStatus

End Sub

Private Sub check(vi As Long, errStatus As Long)

    Dim message As String * 256

    If (errStatus <> 0) Then                            ' Checking errors

        errStatus = agN67xx_error_message(vi, errStatus, message)  ' This functions returns the error message

        errStatus = MsgBox(message, vbCritical + vbOKOnly, "Error")

    End If

End Sub


Using the N6700 Instrument Driver

The Agilent Technologies N6700 instrument driver revision B.00.xx complies with the following:

Microsoft® Windows® 98/NT/2000/XP

VISA revision M.01.01 or later

Agilent Technologies N6700 Firmware revision B.00.10 or later

To successfully use this driver, the following conditions must be met:

For GPIB instrument drivers:

the instrument is connected to the GPIB.

the GPIB address supplied to the initialize function must match the GPIB address of the instrument.

For VXI instrument drivers:

the instrument is installed in the VXI mainframe and you are using one of the following controller options:

Embedded controller

MXI

MXI2

GPIB-VXI

the logical address supplied to the initialize function must match the logical address of the instrument.

For RS-232 instrument drivers:

the instrument is connected to the RS-232 interface.

the COM port, baud rate, parity, and timeout supplied to the initialize function must match the settings of the instrument.

The following information is common to all programs that use the Agilent Technologies N6700 instrument driver:

VISA, VXIplug&play, and the N6700 Instrument Driver

Directory Structure

Opening an Instrument Session

Closing an Instrument Session

VISA Data Types and Selected Constant Definitions

Error Handling


VISA Data Types
VISA Data Types and Selected Constant Definitions

The driver functions use VISA data types. VISA data types are identified by the ‘Vi’ prefix in the data type name (e.g. ViInt16, ViUInt16, ViChar). The visatype.h file contains a complete listing of the VISA data types, function call casts and some of the common constants.  The following is a partial list of the type definitions and constant definitions in the visatype.h.

Completion and Error Codes

VI_SUCCESS	A long equal to zero

VI_ERROR	A long equal to hex 0x80000000

Other VISA Definitions

The size of the following three symbols is operating system dependent and is equal to the default integer size.

VI_NULL	An integer equal to 0

VI_TRUE	An integer equal to 1

VI_FALSE	An integer equal to 0

Variable types

ViUInt32	A 32-bit unsigned integer

ViPUInt32	A pointer to a 32-bit unsigned integer

ViAUInt32	An array of 32-bit unsigned integers

ViInt32	A 32-bit signed integer

ViPInt32	A pointer to a 32-bit signed integer

ViAInt32 	An array of 32-bit signed integers

ViUInt16	A 16-bit unsigned integer

ViPUInt16	A pointer to a 16-bit unsigned integer

ViAUInt16	An array of 16-bit unsigned integers

ViInt16	A 16-bit signed integer

ViPInt16	A pointer to a 16-bit signed integer

ViAInt16	An array of 16-bit signed integers

ViUInt8	A unsigned byte

ViPUInt8	A pointer to an unsigned byte

ViAUInt8	An arrays of unsigned bytes

ViInt8	A 8-bit signed integer

ViPInt8	A pointer to a 8-bit signed integer

ViAInt8	An array of 8-bit signed

ViChar	A character

ViPChar	A pointer to a character

ViAChar	An array of characters

ViByte	A byte

ViPByte	A pointer to a byte

ViAByte	An array of bytes

ViAddr	A Void pointer

ViPAddr	A pointer to a void pointer

ViAAddr	An array of void pointers

ViReal32	A 32-bit floating point

ViPReal32	A pointer to a 32-bit floating point

ViAReal32	An array of 32-bit floating points

ViReal64	A 64-bit floating point

ViPReal64	A pointer a 64-bit floating point

ViAReal64	A pointer to an array of 64-bit floating points

ViBuf	A pointer to an array of bytes

ViPBuf	A pointer to an array of bytes

ViABuf	An array of byte pointers

ViString	An array of characters

ViPString	A pointer to an array of characters

ViAString	An array of ViStrings

ViRsrc	A ViString

ViPRsrc	A pointer to a ViString

ViARsrc	An array of ViStrings

ViBoolean	A 16-bit unsigned boolean value

ViPBoolean	A pointer to a 16-bit unsigned boolean

ViABoolean	An array of 16-bit unsigned booleans

ViStatus	A 32-bit integer status value

ViPStatus	A pointer to a 32-bit integer status value

ViAStatus	An array of 32-bit integer status values

ViVersion	A 32-bit unsigned integer version number

ViPVersion	A pointer to a 32-bit unsigned integer version number

ViAVersion	An array of 32-bit unsigned integer version number

ViObject	A 32-bit unsigned integer object

ViPObject	A pointer to a 32-bit unsigned integer object

ViAObject	An array of 32-bit unsigned objects

ViSession	A 32-bit unsigned integer object

ViPSession	A pointer to a 32-bit unsigned integer object

ViASession	An array of 32-bit unsigned objects


VISA, VXIplug&play, and the N6700 Instrument Driver

This Agilent Technologies N6700 Instrument Driver conforms to all portions of the VXIplug&play driver standard which are applicable to conventional GPIB and other non-VXI instruments.

1.	Conformance with the VXIplug&play standard.

2.	It is built on top of, and uses the services provided by VISA.  VISA supports GPIB and VXI protocols.  The driver can be used with any GPIB card for which the manufacturer has provided a VISA DLL.

3.	It includes a "Function Panel" (.fp) file which allows it to be used with visual programming environments such as Agilent VEE, LabWindows, and LabVIEW.

4.	It includes a comprehensive on-line help file which complements the instrument  manual.  The help file presents application programming examples, a cross-reference between instrument commands and drive functions, and detailed  documentation of each function, with examples.

5.	Source is included so that the driver can be modified if desired.  The source conforms to VXIplug&play standards.  Modifications should only be done by people who are familiar with the VXIplug&play standard.

6.	It includes a Visual Basic include file (.bas) which contains the function calls in Visual Basic syntax, so that driver functions can be called from Visual Basic.  If you use Visual Basic with this driver, you should be familiar with C/C++ function declarations.  In particular, care must be taken when working with C/C++ pointers.


VXIplug&play
For more information on VXIplug&play, access:

http://www.vxipnp.org

using your favorite web browser.


Visual BASIC Data Types

The Visual BASIC data types for VXIplug&play functions are contained in the driver's Visual BASIC header (.BAS) file (e.g. AgN67xx.bas). In a standard this file is located in the directory:

c:\vxipnp\win95\include	- for Win95

c:\vxipnp\winnt\include	- for WinNT

The VISA types and their Visual BASIC equivalents are shown below. You can also determine a function's data types by selecting the Visual BASIC header file from the Project window and then selecting View Code. The data types by function are located in the 'Function Declarations' section of the header file.

VISA Type	Visual BASIC Type Declaration
ViBoolean ViPBoolean ViBoolean[ ] ViInt16 ViPInt16 ViInt16[ ]	Dim ... As Integer
ViInt32 ViPInt32 ViInt32[ ] ViSession ViPSession ViStatus	Dim ... As Long
ViReal64 ViPReal64 ViReal64[ ]	Dim ... As Double
ViString ViPString ViChar[ ] ViRsrc ViPRsrc	Dim ... As String


Visual BASIC Important Notes for Programers
Visual BASIC Important Notes for Programmers

When programming in Visual BASIC note the following:

1.	When passing strings to Agilent Technologies N6700 instrument driver functions the strings must be allocated with a fixed length.  For example to allocate a 256 character string use the statement:

Dim szMyString As String *256

2.	When passing arrays to Agilent Technologies N6700 instrument driver functions pass the array by reference by specifying the first element in the array.  For example:

lMyArray(1)

3.	Visual BASIC defaults to passing parameters by reference. The ByVal keyword is used with numeric types to specify that the parameter is to be passed by value. The ByVal keyword is also used with Visual BASIC String parameters to indicate that the string should be converted to a C string that is then passed by reference.

4.	Visual BASIC uses signed integers only.

5.	For boolean operations that affect program control, use the VISA VI_TRUE and VI_FALSE conditions rather than the True/False states of the Visual BASIC boolean data type. VI_TRUE and VI_FALSE are available with the VISATYPE.BAS header file.


Where to Find it - Online and User Manual Information

Using the Agilent Technologies N6700 instrument driver will require you to use both the online help and the instrument user's manual.  It is assumed that VISA and a GPIB card if required has been installed and properly configured.  The following is a high-level directory of where specific information can be found:

SCPI programming information	- N6700 User's Guide

SCPI Command Reference	- N6700 User's Guide

SCPI example programs	- N6700 User's Guide

General SCPI Reference	- SCPI 1995 Volume2: Command Reference

N67xx instrument driver programming information	- Online Help

N67xx instrument driver example programs	- Online help

N67xx instrument driver function reference	- Online help

VISA Language Information	- VISA User's Manual

Agilent VEE programming information	- Agilent VEE User's Manual


agN67xx
agN67xx  Instrument Driver

© 2004, 2007  Agilent Technologies

This instrument driver provides programming support for agN67xx.

It contains functions for opening, configuring, taking measurements from, and closing the instrument.


agN67xx_SystemReboot

Syntax:

ViStatus _VI_FUNC agN67xx_SystemReboot(ViSession instrumentHandle);

This function causes the instrument to reboot to its power-on state.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_abort

Syntax:

ViStatus _VI_FUNC agN67xx_abort(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 trigParam);

This function cancels any trigger actions presently in process.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
trigParam	Select subsystem trigger to arm. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_TRIG_MEASUREMENT	0	Measurement
	AGN67XX_TRIG_TRANSIENT	1	Transient

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_arm

Syntax:

ViStatus _VI_FUNC agN67xx_arm(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 trigSystem);

This function enables the selected subsystem to receive triggers.  It moves the trigger system from the Idle state to the Initiated state.  It can also  configure the measurement sensor to measure either voltage or current in response to an acquisition trigger. Measurement triggers are only available on models with digitizing capability.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
trigSystem	Select subsystem trigger to arm. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_ARM_OUTPUT_ONCE	0	Output Once
	AGN67XX_ARM_OUTPUT_CONTINUOUS	1	Output Continuous
	AGN67XX_ARM_OUTPUT_CONTINUOUS_OFF	2	Output  Continuous Off
	AGN67XX_ARM_MEASUREMENT	3	Measurement
	AGN67XX_ARM_VOLT_MEASUREMENT	4	Voltage Measurement
	AGN67XX_ARM_CURR_MEASUREMENT	5	Current Measurement

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_close

Syntax:

ViStatus _VI_FUNC agN67xx_close(ViSession instrumentHandle);

The close function terminates the software connection to the instrument and de-allocates system resources.  It is generally a good programming habit to close the instrument handle when the program is done using the instrument.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_cmd

Syntax:

ViStatus _VI_FUNC agN67xx_cmd(ViSession instrumentHandle, ViString stringCommand);

This function passes an instrument command to the instrument.  The function does not expect any response.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
stringCommand	The instrument command.  It must be a NULL terminated C string and may not exceed 256 bytes in length. Data Type:  ViString Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_cmdInt

Syntax:

ViStatus _VI_FUNC agN67xx_cmdInt(ViSession instrumentHandle, ViString sendIntegerCommand, ViInt32 sendInteger);

This function passes the string in cmd_str followed by a space and then an integer.  Note that either a ViInt16 or 32 can be passed, as the ViInt16 will be promoted.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
sendIntegerCommand	The instrument command.  It must be a NULL terminated C string and may not exceed 256 bytes in length. Data Type:  ViString Input/Output:  IN
sendInteger	The integer to be appended to the command string. Data Type:  ViInt32 Input/Output:  IN
	Values:
	Send Integer_MIN	--2147483647
	Send Integer_MAX	2147483647

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_cmdInt16_Q

Syntax:

ViStatus _VI_FUNC agN67xx_cmdInt16_Q(ViSession instrumentHandle, ViString queryI16Command, ViPInt16 i16Result);

This function passes the command string to the instrument.  The function expects a 16--bit integer response from the instrument.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
queryI16Command	The instrument command.  It must be a NULL terminated C string and may not exceed 256 bytes in length. Data Type:  ViString Input/Output:  IN
i16Result	The response from the instrument. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_cmdString_Q

Syntax:

ViStatus _VI_FUNC agN67xx_cmdString_Q(ViSession instrumentHandle, ViString stringCommand, ViInt32 stringSize, ViChar stringResult[ ]);

This function passes the command string to the instrument.  The function waits for a response which must be a string (character data).

A max of size--1 bytes will be read from the instrument into the string and the string will be NULL terminated (so its length can be found with strlen).

If more than size--1 bytes are generated by the instrument then remaining bytes will be discarded and the instrument's output buffer will be cleared.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
stringCommand	The instrument command.  It must be a NULL terminated C string and may not exceed 256 bytes in length. Data Type:  ViString Input/Output:  IN
stringSize	The length of result array in bytes. Data Type:  ViInt32 Input/Output:  IN
	Values:
	String Size_MIN	1
	String Size_MAX	2147483647
stringResult	The response from the instrument. Data Type:  ViChar [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_configureIOPort

Syntax:

ViStatus _VI_FUNC agN67xx_configureIOPort(ViSession instrumentHandle, ViInt16 pinNumber, ViInt16 pinFunction, ViInt16 pinPolarity);

This function configures the digital control port for External Trigger, Fault Output, Inhibit Input, Digital I/O and sets the pin's polarity. The parameters are saved in non--volatile memory.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
pinNumber	This parameter selects the pin number for setting the function and polarity. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_DIGITAL_PIN1	0	Pin1
	AGN67XX_DIGITAL_PIN2	1	Pin2
	AGN67XX_DIGITAL_PIN3	2	Pin3
	AGN67XX_DIGITAL_PIN4	3	Pin4
	AGN67XX_DIGITAL_PIN5	4	Pin5
	AGN67XX_DIGITAL_PIN6	5	Pin6
	AGN67XX_DIGITAL_PIN7	6	Pin7
pinFunction	Specify the selected pin's function Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_PIN_FUNCTION_DIO	0	Digital IO
	AGN67XX_PIN_FUNCTION_DINPUT	1	Digital  Input
	AGN67XX_PIN_FUNCTION_TRIG_OUT	2	Trigger Out
	AGN67XX_PIN_FUNCTION_TRIG_IN	3	Trigger In
	AGN67XX_PIN_FUNCTION_FAULT	4	Fault (pin 1 only)
	AGN67XX_PIN_FUNCTION_INHIBIT	5	Inhibit (pin 3 only)
	AGN67XX_PIN_FUNCTION_ONCOUPLE	6	OnCouple (pins 4-7)
	AGN67XX_PIN_FUNCTION_OFFCOUPLE	7	OffCouple (pins 4-7)
pinPolarity	Specify the selected pin's polarity Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_PIN_FUNCTION_POSITIVE	0	Positive
	AGN67XX_PIN_FUNCTION_NEGATIVE	1	Negative

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_configureOVP

Syntax:

ViStatus _VI_FUNC agN67xx_configureOVP(ViSession instrumentHandle, ViInt16 channelNumber, ViBoolean enabled, ViReal64 OVPLimit);

This function configures the over-voltage protection function of the power module.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
enabled	A boolean that indicates if over-voltage protection is enabled or disabled. If VI_TRUE (1), over-voltage protection is enabled. If VI_FALSE (0), over-voltage protection is disabled. Data Type:  ViBoolean Input/Output:  IN
OVPLimit	The over-voltage protection limit in volts. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_configureOffSequence

Syntax:

ViStatus _VI_FUNC agN67xx_configureOffSequence(ViSession instrumentHandle, ViReal64 channel1Fall, ViReal64 channel2Fall, ViReal64 channel3Fall, ViReal64 channel4Fall);

This function sets the output turn-off sequence delay for all available channels. Note that values must be programmed for ALL four channels even if the instrument does not have four channels. If all four channels are not available, the values sent in those parameters are ignored. Use agN67xx_outputEnableAll to enable/disable all output channels simultaneously.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channel1Fall	The channel 1 fall time. Data Type:  ViReal64 Input/Output:  IN
channel2Fall	The channel 2 fall time. Data Type:  ViReal64 Input/Output:  IN
channel3Fall	The channel 3 fall time. Data Type:  ViReal64 Input/Output:  IN
channel4Fall	The channel 4 fall time. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_configureOnSequence

Syntax:

ViStatus _VI_FUNC agN67xx_configureOnSequence(ViSession instrumentHandle, ViReal64 channel1Rise, ViReal64 channel2Rise, ViReal64 channel3Rise, ViReal64 channel4Rise);

Sets the output turn--on sequence delay for all available channels. Note that values must be programmed for ALL four channels even if the instrument does not have four channels. If all four channels are not available the values sent in those parameters are ignored. Use agN67xx_outputEnableAll to enable/disable all output channels simultaneously.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channel1Rise	The channel 1 rise time. Data Type:  ViReal64 Input/Output:  IN
channel2Rise	The channel 2 rise time. Data Type:  ViReal64 Input/Output:  IN
channel3Rise	The channel 3 rise time. Data Type:  ViReal64 Input/Output:  IN
channel4Rise	The channel 4 rise time. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_configureRegister

Syntax:

ViStatus _VI_FUNC agN67xx_configureRegister(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 register, ViInt16 subRegister, ViInt16 value);

This function sends a binary-weighted value to the selected register.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
register	The status register selection. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_REGISTER_STATUS_BYTE	0	Status Byte
	AGN67XX_REGISTER_STANDARD_EVENT	1	Standard Event
	AGN67XX_REGISTER_OPERATION	2	Operation
	AGN67XX_REGISTER_QUESTIONABLE	3	Questionable
subRegister	The status sub-register selection. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_SUB_REGISTER_CONDITION	0	Condition
	AGN67XX_SUB_REG_NEG_TRANSITION	1	Negative
	AGN67XX_SUB_REG_POS_TRANSITION	2	Positive
	AGN67XX_SUB_REGISTER_EVENT	3	Event
	AGN67XX_SUB_REGISTER_ENABLE	4	Enable
value	The binary-weighted value. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_dcl

Syntax:

ViStatus _VI_FUNC agN67xx_dcl(ViSession instrumentHandle);

This function sends a device clear (DCL) to the instrument.

A device clear will abort the current operation and enable the instrument to accept a new command or query.

This is particularly useful in situations where it is not possible to determine the instrument state. In this case, it is customary to send a device clear before issuing a new instrument driver function.  The device clear ensures that the instrument will be able to begin processing the new commands.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_disableLocalControls

Syntax:

ViStatus _VI_FUNC agN67xx_disableLocalControls(ViSession instrumentHandle);

Disables local control to the instrument.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_dlogAbort

Syntax:

ViStatus _VI_FUNC agN67xx_dlogAbort(ViSession instrumentHandle);

This function aborts a data log if one is in progress.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_dlogConfigureFunction

Syntax:

ViStatus _VI_FUNC agN67xx_dlogConfigureFunction(ViSession instrumentHandle, ViInt16 channelNumber, ViBoolean voltageEnabled, ViBoolean currentEnabled);

This function configures the type of data that will be logged from the specified output channel.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
voltageEnabled	A boolean that indicates if voltage data logging is enabled or disabled. If VI_TRUE (1), voltage logging is enabled. If VI_FALSE (0), voltage logging is disabled. Data Type:  ViBoolean Input/Output:  IN
currentEnabled	A boolean that indicates if current data logging is enabled or disabled. If VI_TRUE (1), current logging is enabled. If VI_FALSE (0), current logging is disabled. Data Type:  ViBoolean Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_dlogConfigureFunctionMinMax

Syntax:

ViStatus _VI_FUNC agN67xx_dlogConfigureFunctionMinMax(ViSession instrumentHandle, ViBoolean enabled);

This function configures if the minimum and maximum values will be logged to the data file.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
enabled	A boolean that enables or disables the logging of min and max values. If VI_TRUE (1), Min/Max data logging is enabled. If VI_FALSE (0), Min/Max data logging is disabled. Data Type:  ViBoolean Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_dlogConfigureTime

Syntax:

ViStatus _VI_FUNC agN67xx_dlogConfigureTime(ViSession instrumentHandle, ViInt32 time, ViInt16 timeIntervalParam, ViReal64 timeInterval);

This function configures the data logging acquisition time and time interval.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
time	The duration of the data log. The value is in seconds, from 1 to 3,599,964,000 (the equivalent of 99,999 hours). Data Type:  ViInt32 Input/Output:  IN
timeIntervalParam	The time interval parameter types. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_TINT_PARAM_VALUE	0	VALUE
	AGN67XX_TINT_PARAM_MIN	1	MINIMUM
	AGN67XX_TINT_PARAM_MAX	2	MAXIMUM
timeInterval	The time interval between data log samples in seconds. The range is from 0.001 seconds to 60 seconds. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_dlogConfigureTriggerCurrent

Syntax:

ViStatus _VI_FUNC agN67xx_dlogConfigureTriggerCurrent(ViSession instrumentHandle, ViInt16 channelNumber, ViReal64 level, ViInt16 slope);

This function configures the trigger current level and slope for the specified output channel.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
level	Specifies the trigger current level in amperes. Data Type:  ViReal64 Input/Output:  IN
slope	Specifies the trigger slope as follows: Positive -- Specifies a rising slope of the output signal. Negative -- Specifies a falling slope of the output signal. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_DLOG_TRIGGER_SLOPE_POSITIVE	0	Positive
	AGN67XX_DLOG_TRIGGER_SLOPE_NEGATIVE	1	Negative

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_dlogConfigureTriggerOffset

Syntax:

ViStatus _VI_FUNC agN67xx_dlogConfigureTriggerOffset(ViSession instrumentHandle, ViInt16 offsetPercent);

This function configures the trigger offset of the data logger.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
offsetPercent	The offset of the datalog trigger in percent. The offset value is the percent of the total data log acquistion time. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_dlogConfigureTriggerSource

Syntax:

ViStatus _VI_FUNC agN67xx_dlogConfigureTriggerSource(ViSession instrumentHandle, ViInt16 sourceType);

This functions configures the trigger source for the data logger.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
sourceType	The trigger source of the data logger. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_DLOG_TRIGGER_SOURCE_BUS	0	BUS
	AGN67XX_DLOG_TRIGGER_SOURCE_IMM	1	IMM
	AGN67XX_DLOG_TRIGGER_SOURCE_EXT	2	EXT
	AGN67XX_DLOG_TRIGGER_SOURCE_VOLT1	3	VOLT1
	AGN67XX_DLOG_TRIGGER_SOURCE_VOLT2	4	VOLT2
	AGN67XX_DLOG_TRIGGER_SOURCE_VOLT3	5	VOLT3
	AGN67XX_DLOG_TRIGGER_SOURCE_VOLT4	6	VOLT4
	AGN67XX_DLOG_TRIGGER_SOURCE_CURR1	7	CURR1
	AGN67XX_DLOG_TRIGGER_SOURCE_CURR2	8	CURR2
	AGN67XX_DLOG_TRIGGER_SOURCE_CURR3	9	CURR3
	AGN67XX_DLOG_TRIGGER_SOURCE_CURR4	10	CURR4
	AGN67XX_DLOG_TRIGGER_SOURCE_ARSKEY	11	ARSKEY
	AGN67XX_DLOG_TRIGGER_SOURCE_OOOKEY	12	OOOKEY

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_dlogConfigureTriggerVoltage

Syntax:

ViStatus _VI_FUNC agN67xx_dlogConfigureTriggerVoltage(ViSession instrumentHandle, ViInt16 channelNumber, ViReal64 level, ViInt16 slope);

This function configures the trigger voltage level and slope for the specified output channel.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
level	Specifies the trigger voltage level in volts. Data Type:  ViReal64 Input/Output:  IN
slope	Specifies the trigger slope as follows: Positive -- Specifies a rising slope of the output signal. Negative -- Specifies a falling slope of the output signal. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_DLOG_TRIGGER_SLOPE_POSITIVE	0	Positive
	AGN67XX_DLOG_TRIGGER_SLOPE_NEGATIVE	1	Negative

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_dlogInitiate

Syntax:

ViStatus _VI_FUNC agN67xx_dlogInitiate(ViSession instrumentHandle, ViString filename);

This function initiates a data log.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
filename	The filename in which to save the data log. Data Type:  ViString Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_dlogTrigger

Syntax:

ViStatus _VI_FUNC agN67xx_dlogTrigger(ViSession instrumentHandle);

This function sends a trigger to the data logger.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_doDelay

Syntax:

ViStatus _VI_FUNC agN67xx_doDelay(ViSession instrumentHandle, ViInt16 milliseconds);

This function provides a delay for the specified amount of time in milliseconds.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
milliseconds	Time delay in milliseconds.  Minimum is 0 and maximum is 30000 (30 seconds). Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_enableLocalControls

Syntax:

ViStatus _VI_FUNC agN67xx_enableLocalControls(ViSession instrumentHandle);

Enables local control to the instrument.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_errorQueryDetect

Syntax:

ViStatus _VI_FUNC agN67xx_errorQueryDetect(ViSession instrumentHandle, ViBoolean errorQueryDetect);

This function enables or disables automatic instrument error checking.

When automatic instrument error querying is enabled, the driver will query the instrument for an error before returning from each driver function.  This adds the overhead of one instrument query to each driver function call.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
errorQueryDetect	A boolean which enables/disables automatic instrument error querying. If VI_TRUE (1), automatic instrument error querying is enabled. If VI_FALSE (0), automatic instrument error querying is disabled. Data Type:  ViBoolean Input/Output:  IN
	Values:
	Name	Value	Description
	VI_TRUE	(1)	Enable
	VI_FALSE	(0)	Disable

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_errorQueryDetect_Q

Syntax:

ViStatus VI_FUNC agN67xx_errorQueryDetect_Q(ViSession instrumentHandle, ViPBoolean errorQueryDetect);

This function indicates if automatic instrument error detection is enabled or disabled.

When automatic instrument error querying is enabled, the driver will query the instrument for an error before returning from each driver function.  This adds the overhead of one instrument query to each driver function call.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
errorQueryDetect	A boolean which indicates if automatic instrument error querying is enabled or disabled. If VI_TRUE (1), automatic instrument error querying is enabled. If VI_FALSE (0), automatic instrument error querying is disabled. Data Type:  ViPBoolean Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_error_message

Syntax:

ViStatus _VI_FUNC agN67xx_error_message(ViSession instrumentHandle, ViStatus statusCode, ViChar statusMessage[ ]);

This function translates the error value returned from an instrument driver function to a user--readable string.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
statusCode	The error return value from an instrument driver function. Data Type:  ViStatus Input/Output:  IN
statusMessage	Error message string.  This is limited to 256 characters. Data Type:  ViChar [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_error_query

Syntax:

ViStatus _VI_FUNC agN67xx_error_query(ViSession instrumentHandle, ViPInt32 errorCode, ViChar errorMessage[ ]);

This function returns the error numbers and corresponding error messages in the error queue of an instrument.  See the manual for a listing of the instrument error numbers and messages.

Instrument errors may occur when a user attempts to place the instrument in an invalid state such as sending an invalid sequence of coupled commands.

Instrument errors can be detected by polling.  Automatic polling can be accomplished by using the agN67xx_errorQueryDetect() function.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
errorCode	Instrument's error code. Data Type:  ViPInt32 Input/Output:  OUT
errorMessage	Instrument's error message.  This is limited to 256 characters. Data Type:  ViChar [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_fetchCurr

Syntax:

ViStatus _VI_FUNC agN67xx_fetchCurr(ViSession instrumentHandle, ViInt16 channelNumber, ViPReal64 currResult);

This function performs the selected current measurement calculation from the previous acquired current data.

Note: This function reprograms the Status Registers when retrieving the measurement. Specifically, it programs the MAV bit to generate an SRQ (service request) signal when the measurement data is available. If you are using the service request signal in your application, you must reprogram the Service Request Enable register after the completion of this function.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
currResult	Measurement result. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_fetchCurrArray

Syntax:

ViStatus _VI_FUNC agN67xx_fetchCurrArray(ViSession instrumentHandle, ViInt16 channelNumber, ViInt32 numReadings, ViReal64 currArray[ ]);

This function retrieves the digitized data of the previous current measurement.  Only applies to models with digitizing capability.

Note: This function reprograms the Status Registers when retrieving the measurement. Specifically, it programs the MAV bit to generate an SRQ (service request) signal when the measurement data is available. If you are using the service request signal in your application, you must reprogram the Service Request Enable register after the completion of this function.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
numReadings	The maximum number of readings to retrieve.  If numReadings is greater than the sweep size, then only the number of readings in the sweep size are returned.  If the sweep size is greater than numReadings, then the numReadings are returned. Note: The waveformArray size must be equal to or greater than numReadings Data Type:  ViInt32 Input/Output:  IN
currArray	An array containing the instantaneous output current in amperes. Data Type:  ViReal64 [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_fetchVolt

Syntax:

ViStatus _VI_FUNC agN67xx_fetchVolt(ViSession instrumentHandle, ViInt16 channelNumber, ViPReal64 voltResult);

This function performs the selected voltage measurement calculation from the previous acquired voltage data.

Note: This function reprograms the Status Registers when retrieving the measurement. Specifically, it programs the MAV bit to generate an SRQ (service request) signal when the measurement data is available. If you are using the service request signal in your application, you must reprogram the Service Request Enable register after the completion of this function.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
voltResult	Measurement result. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_fetchVoltArray

Syntax:

ViStatus _VI_FUNC agN67xx_fetchVoltArray(ViSession instrumentHandle, ViInt16 channelNumber, ViInt32 numReadings, ViReal64 voltArray[ ]);

This function retrieves the digitized data of the previous voltage measurement.  Only applies to models with digitizing capability.

Note: This function reprograms the Status Registers when retrieving the measurement. Specifically, it programs the MAV bit to generate an SRQ (service request) signal when the measurement data is available. If you are using the service request signal in your application, you must reprogram the Service Request Enable register after the completion of this function.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
numReadings	The maximum number of readings to retrieve.  If numReadings is greater than the sweep size, then only the number of readings in the sweep size are returned.  If the sweep size is greater than numReadings, then the only numReadings are returned. Note: The waveformArray size must be equal to or greater than numReadings Data Type:  ViInt32 Input/Output:  IN
voltArray	An array containing the instantaneous output voltage in volts. Data Type:  ViReal64 [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_fileDelete

Syntax:

ViStatus _VI_FUNC agN67xx_fileDelete(ViSession instrumentHandle, ViString filename);

This function deletes the specified file.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
filename	The filename to be deleted. Data Type:  ViString Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_fileExportDlog

Syntax:

ViStatus _VI_FUNC agN67xx_fileExportDlog(ViSession instrumentHandle, ViString filename);

This function exports the datalog in the view window to a CSV file.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
filename	The datalog filename. Data Type:  ViString Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_fileGetSize

Syntax:

ViStatus _VI_FUNC agN67xx_fileGetSize(ViSession instrumentHandle, ViString filename, ViPInt32 fileSize);

This function returns the file size of a file on the instrument.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
filename	The file for which the size is returned. Data Type:  ViString Input/Output:  IN
fileSize	The file size in bytes. Data Type:  ViPInt32  Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_fileReadFirst

Syntax:

ViStatus _VI_FUNC agN67xx_fileReadFirst(ViSession instrumentHandle, ViString filename, ViChar buffer[ ], ViInt32 bufferSize, ViPInt32 bytesRead);

This function begins reading a stream of data from a file on the instrument.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
filename	The file that contains the data. Data Type:  ViString Input/Output:  IN
buffer	The buffer containing bytesRead of data from the file. Data Type:  ViChar [] Input/Output:  OUT
bufferSize	The buffer size in bytes. Data Type:  ViInt32 Input/Output:  IN
bytesRead	The number of bytes returned in buffer. This value is less than or equal to bufferSize. Data Type:  ViPInt32  Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_fileReadNext

Syntax:

ViStatus _VI_FUNC agN67xx_fileReadNext(ViSession instrumentHandle, ViChar buffer[ ], ViInt32 bufferSize, ViPInt32 bytesRead);

This function continues reading a stream of data from a file on the instrument.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
buffer	The buffer containing bytesRead of data from the file. Data Type:  ViChar [] Input/Output:  OUT
bufferSize	The buffer size in bytes. Data Type:  ViInt32 Input/Output:  IN
bytesRead	The number of bytes returned in buffer. This value is less than or equal to bufferSize. Data Type:  ViPInt32  Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getAcqSenseFunc

Syntax:

ViStatus _VI_FUNC agN67xx_getAcqSenseFunc(ViSession instrumentHandle, ViInt16 channelNumber, ViPInt16 senseFunction);

This function queries the sense function configured for the next triggered measurement.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
senseFunction	The measurement sense function:  voltage or current. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getChannels

Syntax:

ViStatus _VI_FUNC agN67xx_getChannels(ViSession instrumentHandle, ViPInt16 channels);

This function returns how many output channels this modular power system has. A mainframe can contain up to a maximum of four output channels.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channels	How many output channels this modular power system has. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getCurr

Syntax:

ViStatus _VI_FUNC agN67xx_getCurr(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 currParam, ViPReal64 currLev);

This function queries the selected current parameter of the output channel.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
currParam	Specify the current parameter to be programmed. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_CURR_IMM	0	Immediate Current Level
	AGN67XX_CURR_MAX	1	Maximum Current
	AGN67XX_CURR_MIN	2	Minimum Current
	AGN67XX_CURR_RANGE_MAX	3	Maximum Current Range
	AGN67XX_CURR_RANGE_MIN	4	Minimum Current Range
	AGN67XX_CURR_SENSE_RANGE_MAX	5	Max. Current Sense Range
	AGN67XX_CURR_SENSE_RANGE_MIN	6	Min. Current Sense Range
	AGN67XX_CURR_TRIG	7	Triggered Current
	AGN67XX_CURR_TRIG_MAX	8	Trigger Maximum Current
	AGN67XX_CURR_TRIG_MIN	9	Trigger Minimum Current
currLev	The programmed current level. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getCurrAcqTrig

Syntax:

ViStatus _VI_FUNC agN67xx_getCurrAcqTrig(ViSession instrumentHandle, ViInt16 channelNumber, ViPInt16 acqTrigSource);

This function queries the configuration parameters of the internal current--triggered acquisition.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
ChannelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
AcqTrigSource	The trigger source of the acquisition subsystem. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getCurrSenseRange

Syntax:

ViStatus _VI_FUNC agN67xx_getCurrSenseRange(ViSession instrumentHandle, ViInt16 channelNumber, ViPReal64 currSenseRange);

This function queries the selection of the current sense range on models that have multiple measurement ranges.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
currSenseRange	The maximum DC current that can be measured on the range that is presently set. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getCurrentCompensate

Syntax:

ViStatus _VI_FUNC agN67xx_getCurrentCompensate(ViSession instrumentHandle, ViInt16 channelNumber, ViPBoolean enabled);

This function queries the current compensation state of the selected output channel.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
enabled	A boolean that indicates if current compensation is enabled or disabled. If VI_TRUE (1), compensation is enabled. If VI_FALSE (0), compensation is disabled. Data Type:  ViPBoolean Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getDate

Syntax:

ViStatus _VI_FUNC agN67xx_getDate(ViSession instrumentHandle, ViPInt16 year, ViPInt16 month, ViPInt16 day);

This function queries the date in the instrument.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
year	Data Type:  ViPInt16 Input/Output:  OUT
month	Data Type:  ViPInt16 Input/Output:  OUT
day	Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getDigitalPort

Syntax:

ViStatus _VI_FUNC agN67xx_getDigitalPort(ViSession instrumentHandle, ViPInt16 digitaldata);

This function reads a data value from the digital port.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
digitaldata	Value read from the digital I/O port. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getEnableReg

Syntax:

ViStatus _VI_FUNC agN67xx_getEnableReg(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 enableRegister, ViPInt16 enableMask);

This function returns the contents of the selected enable register mask.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
enableRegister	Specifies a status register on the instrument. The following registers are defined: Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_REG_ESE	0	Standard Event Status
	AGN67XX_REG_SRE	1	Service Request
	AGN67XX_REG_OPER	2	Operation Status
	AGN67XX_REG_QUES	5	Questionable Status
enableMask	The contents of the selected enable register mask. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getFourWireSense

Syntax:

ViStatus _VI_FUNC agN67xx_getFourWireSense(ViSession instrumentHandle, ViInt16 channelNumber, ViPInt16 fourWireSenseType);

This function queries the four-wire sense function.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
fourWireSenseType	The four-wire sense type. Internal - sets the remote sense relays to local sensing.  External - sets the remote sense relays to remote sensing.  Data Type:  ViPInt16 Input/Output:  OUT
	Values:
	Name	Value	Description
	AGN67XX_FOUR_WIRE_SENSE_INTERNAL	0	INTERNAL
	AGN67XX_FOUR_WIRE_SENSE_EXTERNAL	1	EXTERNAL

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()

agN67xx_getFourWireSense

      ViStatus agN67xx_getFourWireSense (ViSession instrumentHandle, ViInt16 channelNumber,

                                         ViInt16 *fourWireSenseType);

Parameter List

      instrumentHandle

          Variable Type       ViSession

          The instrument's VISA session handle returned from agN67xx_init().

      channelNumber

          Variable Type       ViInt16

          The channel parameter selection.

      fourWireSenseType

          Variable Type       ViInt16 (passed by reference)

          Four Wire Sense Type.

Return Value

          The meaning of the VISA status returned by the function is as follows:

           = 0  "VI_SUCCESS"    The function completed successfully.

           > 0  Warning         The function completed, but an

                                exceptional condition occurred which

                                may require attention.

           < 0  Error           The function did not complete

                                successfully.

          Use the agN67xx_error_message() function to get a textual description of errors and

          warnings.


agN67xx_getMeasTimeout

Syntax:

ViStatus _VI_FUNC agN67xx_getMeasTimeout(ViSession instrumentHandle, ViPInt32 measTimeout);

This function queries the measurement timeout value.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
measTimeout	The acquisition timeout value in milliseconds. Data Type:  ViPInt32 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getMeasurementRange

Syntax:

ViStatus _VI_FUNC agN67xx_getMeasurementRange(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 measurementType, ViPReal64 senseRange);

This function returns the measurement voltage and current range.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
measurementType	The subsystem to trigger.  There are two subsystems that can be triggered in the instrument -- output and measurement acquisition. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_CURRENT	1	Current
	AGN67XX_VOLTAGE	0	Voltage
senseRange	The measurement range. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getMeasurementTrigSource

Syntax:

ViStatus _VI_FUNC agN67xx_getMeasurementTrigSource(ViSession instrumentHandle, ViInt16 channelNumber, ViPInt16 triggerSource);

This function returns the trigger source for a measurement trigger. Only applies to models with digitizing capability.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
triggerSource	The trigger source. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getMeasurementWindow

Syntax:

ViStatus _VI_FUNC agN67xx_getMeasurementWindow(ViSession instrumentHandle, ViInt16 channelNumber, ViPInt16 windowType);

This function queries the window function setting that is used in output measurement calculations. Only applies to models with digitizing capability.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
windowType	The windowing function type. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getOcpParams

Syntax:

ViStatus _VI_FUNC agN67xx_getOcpParams(ViSession instrumentHandle, ViInt16 channelNumber, ViPBoolean ocpEnable, ViPReal64 OCPDelay);

This function queries the over--current protection parameters.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
ocpEnable	The state of the over-current protection function. Data Type:  ViPBoolean Input/Output:  OUT
OCPDelay	Time delay before a Constant Current condition is recognized. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getOutpTrigSource

Syntax:

ViStatus _VI_FUNC agN67xx_getOutpTrigSource(ViSession instrumentHandle, ViInt16 channelNumber, ViPInt16 outpTrigSource);

This function queries the trigger source setting of the output subsystem.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
outpTrigSource	The trigger transient source of the acquisition subsystem. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getOutputCoupleChannels

Syntax:

ViStatus _VI_FUNC agN67xx_setOutputCoupleChannels(ViSession instrumentHandle, ViPString channels);

This function queries which output channels are coupled.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channels	The output channels that are coupled. This is a comma seperated list of channels in the format n[,n[,n[,n]]]. Data Type:  ViPString Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getOutputCoupleDelayOffset

Syntax:

ViStatus _VI_FUNC agN67xx_getOutputCoupleDelayOffset(ViSession instrumentHandle, ViPReal64 delayOffset);

This function queries the output coupling delay offset.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
delayOffset	The delay offset in seconds. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getOutputCoupleDelayOffsetMode

Syntax:

ViStatus _VI_FUNC agN67xx_getOutputCoupleDelayOffsetMode(ViSession instrumentHandle, ViPInt16 outputCoupleOffsetModeType);

This function queries the output coupling delay offset mode.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
outputCoupleOffsetModeType	The output coupling delay offset mode. Data Type:  ViPInt16 Input/Output:  OUT
	Values:
	Name	Value	Description
	AGN67XX_OUTPUT_COUPLE_DELAY_OFFSET_MODE_AUTO	0	Auto mode
	AGN67XX_OUTPUT_COUPLE_DELAY_OFFSET_MODE_MANUAL	1	Manual mode

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getOutputCoupleEnabled

Syntax:

ViStatus _VI_FUNC agN67xx_getOutputCoupleEnabled(ViSession instrumentHandle, ViPBoolean enabled);

This function queries the state of the output coupling function.

This function is always enabled on Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
enabled	A boolean that indicates if output coupling is enabled or disabled. If VI_TRUE (1), output coupling is enabled. If VI_FALSE (0), output coupling is disabled. Data Type:  ViPBoolean Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getOutputCoupleMaxDelayOffset

Syntax:

ViStatus _VI_FUNC agN67xx_getOutputCoupleDelayOffset(ViSession instrumentHandle, ViPReal64 delayOffset);

This function queries the maximum output coupling delay offset.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
delayOffset	The maximum delay offset in seconds. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getOutputEnabled

Syntax:

ViStatus _VI_FUNC agN67xx_getOutputEnabled(ViSession instrumentHandle, ViInt16 channelNumber, ViPBoolean enabled);

This function queries the output state of the channel.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
enabled	A boolean that indicates if the output is enabled or disabled. If VI_TRUE (1), the output is enabled. If VI_FALSE (0), the output is disabled. Data Type:  ViPBoolean Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getOutputGroup

Syntax:

ViStatus _VI_FUNC agN67xx_getOutputGroup(ViSession instrumentHandle, ViPInt16 groupMode);

This function returns the setting of the output group.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
groupMode	The output group setting. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getOutputInhibitMode

Syntax:

ViStatus _VI_FUNC agN67xx_getOutputInhibitMode(ViSession instrumentHandle, ViPInt16 inhibitMode);

This function queries the output inhibit mode setting.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
inhibitMode	The inhibit mode setting. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getOutputState

Syntax:

ViStatus _VI_FUNC agN67xx_getOutputState(ViSession instrumentHandle, ViInt16 channelNumber, ViPBoolean outputState);

This function queries the present output state of the instrument.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
outputState	A boolean that indicates if the output is enabled or disabled. If VI_TRUE (1), the output is enabled. If VI_FALSE (0), the output is disabled. Data Type:  ViPBoolean Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getPowerLimit

Syntax:

ViStatus _VI_FUNC agN67xx_getPowerLimit(ViSession instrumentHandle, ViInt16 channelNumber, ViPReal64 powerLimit);

This function queries the present power limit setting.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
powerLimit	The power limit setting. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getPowerLimitMax

Syntax:

ViStatus _VI_FUNC agN67xx_getPowerLimitMax(ViSession instrumentHandle, ViInt16 channelNumber, ViPReal64 powerLimit);

This function queries the maximum allowable power limit setting of the output channel - within the constraints of the present power limit settings of the other channels.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
powerLimitMax	The maximum allowable power limit setting. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getPowerOnState

Syntax:

ViStatus _VI_FUNC agN67xx_getPowerOnState(ViSession instrumentHandle, ViPInt16 powerOnState);

This function queries the power--on state setting of the instrument.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
powerOnState	Power--on state recall setting.  The following values are returned: Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getProtectionCoupleFaults

Syntax:

ViStatus _VI_FUNC agN67xx_getProtectionCoupleFaults(ViSession instrumentHandle, ViPBoolean coupleFaults);

This function queries the channel coupling for protection faults.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
coupleFaults	A boolean that indicates if the output channels are coupled for protection faults. If VI_TRUE (1), the channels are coupled. If VI_FALSE (0), the channels are not coupled. Data Type:  ViPBoolean Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getProtectionOCPDelay

Syntax:

ViStatus _VI_FUNC agN67xx_getProtectionOCPDelay(ViSession instrumentHandle, ViInt16 channelNumber, ViPReal64 OCPDelay);

This function queries the over-current protection delay.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
OCPDelay	The over-current protection delay. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getProtectionOVPLimit

Syntax:

ViStatus _VI_FUNC agN67xx_getProtectionOVPLimit(ViSession instrumentHandle, ViInt16 channelNumber, ViPReal64 OVPLimit);

This function queries the over-voltage protection limit.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
OVPLimit	The over-voltage protection limit. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getProtectionOVPLimitMax

Syntax:

ViStatus _VI_FUNC agN67xx_getProtectionOVPLimitMax(ViSession instrumentHandle, ViInt16 channelNumber, ViPReal64 OVPLimitMax);

This function queries the maximum over--voltage protection level.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
OVPLimitMax	The maximum over-voltage protection level. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getRegister

Syntax:

ViStatus _VI_FUNC agN67xx_getRegister(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 register, ViInt16 subRegister, ViPInt16 value);

This function returns the contents of the selected status register.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
register	Specifies a status register on the instrument. The following registers are defined: Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_REGISTER_STATUS_BYTE	0	Status Byte
	AGN67XX_REGISTER_STANDARD_EVENT	1	Standard Event
	AGN67XX_REGISTER_OPERATION	2	Operation
	AGN67XX_REGISTER_QUESTIONABLE	3	Questionable
subRegister	Specifies a sub-register on the instrument. The following sub-registers are defined: Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_SUB_REGISTER_CONDITION	0	Condition
	AGN67XX_SUB_REG_NEG_TRANSITION	1	Negative
	AGN67XX_SUB_REG_POS_TRANSITION	2	Positive
	AGN67XX_SUB_REGISTER_EVENT	3	Event
	AGN67XX_SUB_REGISTER_ENABLE	4	Enable
value	The contents of the selected register. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getRelayPolarity

Syntax:

ViStatus _VI_FUNC agN67xx_getRelayPolarity(ViSession instrumentHandle, ViInt16 channelNumber, ViPInt16 polarityType);

This function queries the polarity setting of the output and sense terminals.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
polarityType	The output polarity setting:  normal or reversed. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getStatusSerialPoll

Syntax:

ViStatus _VI_FUNC agN67xx_getStatusSerialPoll(ViSession instrumentHandle, ViPInt16 statusByte);

This function serial polls the instrument’s status byte. It returns the value of the status byte register.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
statusByte	The status byte value. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getSweepParams

Syntax:

ViStatus _VI_FUNC agN67xx_getSweepParams(ViSession instrumentHandle, ViInt16 channelNumber, ViPReal64 sampleInterval, ViPInt32 sweepSize, ViPInt32 sweepOffset);

This function queries the sweep parameters of a waveform measurement acquisition.Only applies to models with digitizing capability.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
sampleInterval	The time period between samples. Data Type:  ViPReal64 Input/Output:  OUT
sweepSize	The number of points in an acquisition. Data Type:  ViPInt32 Input/Output:  OUT
sweepOffset	The offset of the beginning of the acquisition buffer relative to the acquisition trigger. Data Type:  ViPInt32 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getSystemFirmwareNumber

Syntax:

ViStatus _VI_FUNC agN67xx_getSystemFirmwareNumber(ViSession instrumentHandle, ViChar firmwareNumber[ ]);

Reads the firmware number of the mainframe.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
firmwareNumber	The instrument driver revision.  This is limited to 256 characters. Data Type:  ViChar [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getSystemGroupedInformation

Syntax:

ViStatus _VI_FUNC agN67xx_getSystemGroupedInformation(ViSession instrumentHandle, ViInt16 channelNumber, ViPInt16 groupedStatus);

This function returns group status information about a specific output channel. All output channels can be queried, whether they have been grouped or not.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
groupedStatus	The group status information for the specified output channel. The following values are defined: 0 = the channel is NOT in a group. 1 = the channel is in a group and IS the lowest channel of the group. 2 = the channel is in a group, but is NOT the lowest channel of the group. Data Type:  ViPInt16 Input/Output:  OUT
	Values:
	Name	Value	Description
	AG_NO_GROUPED	0	Channel is not grouped
	AG_LOWEST_GROUPED	1	Channel is lowest channel
	AG_GROUPED	2	Channel is not lowest channel
Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getSystemModuleName

Syntax:

ViStatus _VI_FUNC agN67xx_getSystemModuleName(ViSession instrumentHandle, ViInt16 channelNumber, ViChar moduleName[ ]);

Returns the power module's model name.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
moduleName	The power module's model name.  This is limited to 256 characters.  When programming in VisualBasic, you must use a fixed size string. Data Type:  ViChar [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getSystemModuleOption

Syntax:

ViStatus _VI_FUNC agN67xx_getSystemModuleOption(ViSession instrumentHandle, ViInt16 channelNumber, ViChar optionName[ ]);

Returns a list of options installed in the power module.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
optionName	The comma-separated list of installed options.  This is limited to 256 characters.  When programming in VisualBasic, you must use a fixed size string. Data Type:  ViChar [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getSystemModuleSerialNumber

Syntax:

ViStatus _VI_FUNC agN67xx_getSystemModuleSerialNumber(ViSession instrumentHandle, ViInt16 channelNumber, ViChar serialNumber[ ]);

Returns the power module's serial number.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
serialNumber	The power module's serial number.  This is limited to 256 characters.  When programming in VisualBasic, you must use a fixed size string.. Data Type:  ViChar [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getSystemName

Syntax:

ViStatus _VI_FUNC agN67xx_getSystemName(ViSession instrumentHandle, ViChar systemName[ ]);

Returns the model name of the mainframe.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
systemName	The model name of the mainframe.  This is limited to 256 characters.  When programming in VisualBasic, you must use a fixed size string. Data Type:  ViChar [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getSystemSerialNumber

Syntax:

ViStatus _VI_FUNC agN67xx_getSystemSerialNumber(ViSession instrumentHandle, ViChar serialNumber[ ]);

Returns the serial number of the mainframe.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
serialNumber	The serial number of the mainframe.  This is limited to 256 characters.  When programming in VisualBasic, you must use a fixed size string. Data Type:  ViChar [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getTime

Syntax:

ViStatus _VI_FUNC agN67xx_getTime(ViSession instrumentHandle, ViPInt16 hour, ViPInt16 minute, ViPInt16 second);

This function queries the time in the instrument.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
hour	Data Type:  ViPInt16 Input/Output:  OUT
minute	Data Type:  ViPInt16 Input/Output:  OUT
second	Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getTransientListLength

Syntax:

ViStatus _VI_FUNC agN67xx_getTransientListLength(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 listType, ViPInt16 listlength);

This function returns the number of list points of the specified list type. Only applies to models with list capability.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
listType	The subsystem to trigger.  There are two subsystems that can be triggered in the instrument -- output and measurement acquisition. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_LIST_TYPES_DWELL_TIME	0	Dwell Time
	AGN67XX_LIST_TYPES_CURRENT	1	Current
	AGN67XX_LIST_TYPES_VOLTAGE	2	Voltage
	AGN67XX_LIST_TYPES_BOS	3	BOS
	AGN67XX_LIST_TYPES_EOS	4	EOS
listlength	The length of the transient list.  Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getTransientStepTrigLevel

Syntax:

ViStatus _VI_FUNC agN67xx_getTransientStepTrigLevel(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 triggerLevelType, ViPReal64 triggerlevel);

This function returns the trigger level of the transient step.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
triggerLevelType	The subsystem to trigger.  There are two subsystems that can be triggered in the instrument -- output and measurement acquisition. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_CURRENT	1	Current
	AGN67XX_VOLTAGE	0	Voltage
triggerlevel	The trigger level. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getTransientStepTrigOut

Syntax:

ViStatus _VI_FUNC agN67xx_getTransientStepTrigOut(ViSession instrumentHandle, ViInt16 channelNumber, ViPBoolean stepTrigOut);

This function returns the setting of the transient step trigger.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
stepTrigOut	A boolean that indicates if a transient step trigger is enabled or disabled. If VI_TRUE (1), the step trigger is enabled. If VI_FALSE (0), the step trigger is disabled. Data Type:  ViPBoolean Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getTransientTrigSource

Syntax:

ViStatus _VI_FUNC agN67xx_getTransientTrigSource(ViSession instrumentHandle, ViInt16 channelNumber, ViPInt16 triggerSource);

This function returns the setting of the transient trigger source.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
triggerSource	The transient trigger source. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getTriggerMode

Syntax:

ViStatus _VI_FUNC agN67xx_getTriggerMode(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 triggerFunction, ViPInt16 triggerMode);

This function returns the setting of the transient trigger mode.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
triggerFunction	Specifies the trigger function: voltage or current. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_CURRENT	1	Current
	AGN67XX_VOLTAGE	0	Voltage
triggerMode	The trigger mode setting. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getVolt

Syntax:

ViStatus _VI_FUNC agN67xx_getVolt(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 voltQParam, ViPReal64 voltLev);

This function queries the selected voltage parameter of the output channel.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
voltQParam	Specifies the voltage parameter to query. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_VOLT_IMM	0	Immediate Voltage Level
	AGN67XX_VOLT_MAX	1	Maximum Voltage Level
	AGN67XX_VOLT_MIN	2	Minimum Voltage Level
	AGN67XX_VOLT_OVP	3	OVP Level
	AGN67XX_VOLT_OVP_MAX	4	Maximum OVP Level
	AGN67XX_VOLT_OVP_MIN	5	Minimum OVP Level
	AGN67XX_VOLT_RANGE_MAX	6	Maximum Voltage Range
	AGN67XX_VOLT_RANGE_MIN	7	Minimum Voltage Range
	AGN67XX_VOLT_SENSE_RANGE_MAX	8	Max. Voltage Sense Range
	AGN67XX_VOLT_SENSE_RANGE_MIN	9	Min. Voltage Sense Range
	AGN67XX_VOLT_TRIG	10	Triggered Voltage Level
	AGN67XX_VOLT_TRIG_MAX	11	Triggered Maximum Voltage
	AGN67XX_VOLT_TRIG_MIN	12	Triggered Minimum Voltage
voltLev	The specified voltage level. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getVoltAcqTrig

Syntax:

ViStatus _VI_FUNC agN67xx_getVoltAcqTrig(ViSession instrumentHandle, ViInt16 channelNumber, ViPInt16 acqTrigSource);

This function queries the configuration parameters of the internal voltage--triggered acquisition.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
acqTrigSource	The trigger measurement source of the acquisition subsystem. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getVoltSenseRange

Syntax:

ViStatus _VI_FUNC agN67xx_getVoltSenseRange(ViSession instrumentHandle, ViInt16 channelNumber, ViPReal64 voltSenseRange);

This function queries the selected voltage sense range parameter on models that have multiple measurement ranges.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
voltSenseRange	The maximum DC voltage that can be measured on the range that is presently set.. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_getVoltageSlewRate

Syntax:

ViStatus _VI_FUNC agN67xx_getVoltageSlewRate(ViSession instrumentHandle, ViInt16 channelNumber, ViPReal64 slewRate);

This function returns the voltage slew rate.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
slewRate	The voltage slew rate. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_init

Syntax:

ViStatus _VI_FUNC agN67xx_init(ViRsrc resourceName, ViBoolean IDQuery, ViBoolean resetDevice, ViPSession instrumentHandle);

The initialize function initializes the software connection to the instrument and optionally verifies that instrument is in the system.  In addition, it may perform any necessary actions to place the instrument in its reset state.

Parameter	Description
resourceName	The instrument's VISA resource description. The default for this instrument is "GPIB0::5::INSTR".  If you change the GPIB address of this instrument, you must change the default resource description as well. Data Type:  ViRsrc Input/Output:  IN
IDQuery	If VI_TRUE, perform an identity query to verify that the instrument is the one expected by the driver. If VI_FALSE, do not perform a revision query. Data Type:  ViBoolean Input/Output:  IN
	Values:
	Name	Value	Description
	VI_TRUE	(1)	Do Query
	VI_FALSE	(0)	Skip Query
resetDevice	If VI_TRUE, perform a reset operation while initializing the instrument. If VI_FALSE, do not perform a reset operation. Data Type:  ViBoolean Input/Output:  IN
	Values:
	Name	Value	Description
	VI_TRUE	(1)	Reset
	VI_FALSE	(0)	Don't Reset
instrumentHandle	The instrument's VISA session handle.  This is VI_NULL if an error occurred during the initialization process. Data Type:  ViPSession Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_measureCurr

Syntax:

ViStatus _VI_FUNC agN67xx_measureCurr(ViSession instrumentHandle, ViInt16 channelNumber, ViPReal64 currResult);

This function immediately starts acquiring new current data and returns the selected measurement from this data as soon as the buffer is full.  This is the easiest way to make measurements, since it requires no explicit trigger programming.

Many parameters of the measurement are programmable. These include the number of samples, the time interval between samples, the bandwidth, and the method of triggering.

Note 1. There is a tradeoff between these parameters and the speed, accuracy, and stability of the measurement in the presence of noise.

Note 2. This function reprograms the Status Registers when retrieving the measurement. Specifically, it programs the MAV bit to generate an SRQ (service request) signal when the measurement data is available. If you are using the service request signal in your application, you must reprogram the Service Request Enable register after the completion of this function.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
currResult	The measurement result. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_measureCurrArray

Syntax:

ViStatus _VI_FUNC agN67xx_measureCurrArray(ViSession instrumentHandle, ViInt16 channelNumber, ViInt32 numReadings, ViReal64 currArray[ ]);

This function immediately starts acquiring new current data, and returns the digitized data as soon as the buffer is full. Only applies to models with digitizing capability.  The agN67xx_setSweepParams() function can be used to control the digitization parameters. A timeout value can be set using the agN 67xx_setMeasTimeout() function. The default acquisition timeout is 5 seconds.

Note 1. There is a tradeoff between these parameters and the speed, accuracy, and stability of the measurement in the presence of noise.

Note 2. This function reprograms the Status Registers when retrieving the measurement. Specifically, it programs the MAV bit to generate an SRQ (service request) signal when the measurement data is available. If you are using the service request signal in your application, you must reprogram the Service Request Enable register after the completion of this function.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
numReadings	The number of readings to be retrieved.  This value should not exceed the size of the waveformArray. Data Type:  ViInt32 Input/Output:  IN
currArray	An array containing the instantaneous output current in amperes. Data Type:  ViReal64 [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_measureVolt

Syntax:

ViStatus _VI_FUNC agN67xx_measureVolt(ViSession instrumentHandle, ViInt16 channelNumber, ViPReal64 voltResult);

This function immediately starts acquiring new voltage data and returns the selected measurement from this data as soon as the buffer is full.  This is the easiest way to make measurements, since it requires no explicit trigger programming.

Many parameters of the measurement are programmable. These include the number of samples, the time interval between samples, the bandwidth, and the method of triggering.

Note 1. There is a tradeoff between these parameters and the speed, accuracy, and stability of the measurement in the presence of noise.

Note 2. This function reprograms the Status Registers when retrieving the measurement. Specifically, it programs the MAV bit to generate an SRQ (service request) signal when the measurement data is available. If you are using the service request signal in your application, you must reprogram the Service Request Enable register after the completion of this function.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
voltResult	The measurement result. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_measureVoltArray

Syntax:

ViStatus _VI_FUNC agN67xx_measureVoltArray(ViSession instrumentHandle, ViInt16 channelNumber, ViInt32 numReadings, ViReal64 voltArray[ ]);

This function immediately starts acquiring new voltage data, and returns the digitized data as soon as the buffer is full. Only applies to models with digitizing capability.  The agN67xx_setSweepParams() function can be used to control the digitization parameters.  A timeout value can be set using the ag N67xx_setMeasTimeout() function. The default acquisition timeout is 5 seconds.

Note 1. There is a tradeoff between these parameters and the speed, accuracy, and stability of the measurement in the presence of noise.

Note 2. This function reprograms the Status Registers when retrieving the measurement. Specifically, it programs the MAV bit to generate an SRQ (service request) signal when the measurement data is available. If you are using the service request signal in your application, you must reprogram the Service Request Enable register after the completion of this function.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
voltArray	An array containing the instantaneous output voltage in volts. Data Type:  ViReal64 [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_measurementConfigure

Syntax:

ViStatus _VI_FUNC agN67xx_measurementConfigure(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 measurementType, ViInt32 offsetPoints, ViInt16 points, ViReal64 sampleInterval);

This function sets the measurement type, the trigger offset points, the measurement points, and the measurement sample interval for measurements. The measurement type is ignored when programming Models N6761A and N6762A. This is because these models measure both voltage and current simultaneously. Only applies to models with digitizing capability.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
measurementType	Specifies the measurement type: voltage or current. Data Type:  ViInt16 Input/Output:  IN														1
	Values:
	Name	Value	Description
	AGN67XX_CURRENT	1	Current
	AGN67XX_VOLTAGE	0	Voltage
offsetPoints	The trigger offset points. Values can range from -4095 to 2,000,000,000. Data Type:  ViInt32 Input/Output:  IN
points	The number of measurement points.Values can range from 1 to 4096. Data Type:  ViInt16 Input/Output:  IN
sampleInterval	The measurement sample interval. Values can range from 20.48 microseconds to 40000 seconds.  Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_measurementFetch

Syntax:

ViStatus _VI_FUNC agN67xx_measurementFetch(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 fetchType, ViPReal64 fetchResult);

This function returns the output voltage or current from the previously acquired measurement. It can only be called after a measurement has already been performed.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
fetchType	Specifies the measurement type: voltage or current. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_CURRENT	1	Current
	AGN67XX_VOLTAGE	0	Voltage
fetchResult	The measurement. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_measurementFetchArray

Syntax:

ViStatus _VI_FUNC agN67xx_measurementFetchArray(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 fetchType, ViInt16 numerReadings, ViReal64 resultArray[ ]);

This function returns the output voltage or current array from the previously acquired measurement. It can only be called after a measurement has already been performed.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
fetchType	Specifies the measurement type: voltage or current. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_CURRENT	1	Current
	AGN67XX_VOLTAGE	0	Voltage
numerReadings	The number of readings in the array. Data Type:  ViInt16 Input/Output:  IN
resultArray	The measurement array data. Data Type:  ViReal64 [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_measurementMeasure

Syntax:

ViStatus _VI_FUNC agN67xx_measurementMeasure(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 measurementType, ViPReal64 measureResult);

This function takes a measurement on the output and returns the measured value.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
measurementType	Specifies the measurement type: voltage or current. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_CURRENT	1	Current
	AGN67XX_VOLTAGE	0	Voltage
measureResult	The measurement.  Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_measurementMeasureArray

Syntax:

ViStatus _VI_FUNC agN67xx_measurementMeasureArray(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 measurementType, ViInt16 numerReadings, ViReal64 resultArray[ ]);

This function takes a measurement and returns the acquisition array. Only applies to models with digitizing capability.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
measurementType	Specifies the measurement type: voltage or current. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_CURRENT	1	Current
	AGN67XX_VOLTAGE	0	Voltage
numerReadings	The number of readings in the array. Data Type:  ViInt16 Input/Output:  IN
resultArray	The measurement data array. Data Type:  ViReal64 [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_measurementTrigAbort

Syntax:

ViStatus _VI_FUNC agN67xx_measurementTrigAbort(ViSession instrumentHandle, ViInt16 channelNumber);

This function cancels any measurement trigger actions presently in process. It returns the measurement trigger system to the Idle state and resets the WTG--meas bit in the Operation Condition Status register.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_measurementTrigImmediate

Syntax:

ViStatus _VI_FUNC agN67xx_measurementTrigImmediate(ViSession instrumentHandle, ViInt16 channelNumber);

This function immediately causes a measurement trigger to occur. The measurement trigger system must first be initiated before this method can be used.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_measurementTrigInitiate

Syntax:

ViStatus _VI_FUNC agN67xx_measurementTrigInitiate(ViSession instrumentHandle, ViInt16 channelNumber);

This function initiates the measurement trigger system. The agN67xx_measurementTrigImmediate function then causes the specified triggered action to occur.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_opc_Q

Syntax:

ViStatus _VI_FUNC agN67xx_opc_Q(ViSession instrumentHandle, ViPBoolean instrumentReady);

This function queries the operation complete bit in the Status Byte.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
instrumentReady	The status of the OPC bit in the Status Byte. Data Type:  ViPBoolean Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_operCond_Q

Syntax:

ViStatus _VI_FUNC agN67xx_operCond_Q(ViSession instrumentHandle, ViInt16 channelNumber, ViPInt32 operationConditionRegister);

This function queries the Operation Condition register.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
operationConditionRegister	The value of the Operation Condition register. Data Type:  ViPInt32 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_operEvent_Q

Syntax:

ViStatus _VI_FUNC agN67xx_operEvent_Q(ViSession instrumentHandle, ViInt16 channelNumber, ViPInt32 operationEventRegister);

This function queries the Operation Event register.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
operationEventRegister	The value of the Operation Event register. Data Type:  ViPInt32 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_outputCurrentLimit

Syntax:

ViStatus _VI_FUNC agN67xx_outputCurrentLimit(ViSession instrumentHandle, ViInt16 channelNumber, ViReal64 currentRange, ViReal64 currentLimit);

This function programs the output current limit as well as the output current range of the selected channel.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
currentRange	The output current range. This parameter only applies to models that have multiple output ranges. Data Type:  ViReal64 Input/Output:  IN
currentLimit	The output current limit. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_outputEnableAll

Syntax:

ViStatus _VI_FUNC agN67xx_outputEnableAll(ViSession instrumentHandle, ViBoolean enabled);

This function enables/disables all output channels simultaneously. Can be used in conjunction with agN67xx_configureOnSequence and agN67xx_configureOffSequence.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
enabled	A boolean that enables or disabled all output channels. If VI_TRUE (1), the output channels are enabled. If VI_FALSE (0), the output channels are disabled. Data Type:  ViBoolean Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_outputVoltCurr

Syntax:

ViStatus _VI_FUNC agN67xx_outputVoltCurr(ViSession instrumentHandle, ViInt16 channelNumber, ViReal64 voltageLevel, ViReal64 currentLimit);

This function programs the output current level, the output voltage level, and enables the output.  If option 761 is present the output relay will also be enabled.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
voltageLevel	The immediate voltage level of the output channel. Data Type:  ViReal64 Input/Output:  IN
currentLimit	The immediate current limit of the output channel. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_outputVoltageLevel

Syntax:

ViStatus _VI_FUNC agN67xx_outputVoltageLevel(ViSession instrumentHandle, ViInt16 channelNumber, ViReal64 voltageRange, ViReal64 voltageLevel);

This function programs the immediate output voltage level as well as the output voltage range of the selected channel.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
voltageRange	The output voltage range. This parameter only apples to models that have multiple output ranges. Data Type:  ViReal64 Input/Output:  IN
voltageLevel	The output voltage level. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_queryCurrentLimitMax

Syntax:

ViStatus _VI_FUNC agN67xx_queryCurrentLimitMax(ViSession instrumentHandle, ViInt16 channelNumber, ViPReal64 limitMax);

This function returns the maximum programmable current limit.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
limitMax	The maximum current limit. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_queryIOPort

Syntax:

ViStatus _VI_FUNC agN67xx_queryIOPort(ViSession instrumentHandle, ViInt16 pinNumber, ViPInt16 pinFunction, ViPInt16 pinPolarity);

This function returns the configuration of a specific pin on the IO port.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
pinNumber	This parameter selects the pin number for setting the function and polarity. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_DIGITAL_PIN1	0	Pin1
	AGN67XX_DIGITAL_PIN2	1	Pin2
	AGN67XX_DIGITAL_PIN3	2	Pin3
	AGN67XX_DIGITAL_PIN4	3	Pin4
	AGN67XX_DIGITAL_PIN5	4	Pin5
	AGN67XX_DIGITAL_PIN6	5	Pin6
	AGN67XX_DIGITAL_PIN7	6	Pin7
pinFunction	The pin function. Data Type:  ViPInt16 Input/Output:  OUT
pinPolarity	The pin polarity. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_queryVoltageLevelMax

Syntax:

ViStatus _VI_FUNC agN67xx_queryVoltageLevelMax(ViSession instrumentHandle, ViInt16 channelNumber, ViPReal64 limitMax);

This function returns the maximum programmable voltage level.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
limitMax	The maximum voltage level. Data Type:  ViPReal64 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_quesCond_Q

Syntax:

ViStatus _VI_FUNC agN67xx_quesCond_Q(ViSession instrumentHandle, ViInt16 channelNumber, ViPInt32 questionableConditionRegister);

This function queries the Questionable Condition register.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
questionableConditionRegister	The value of the Questionable Condition register. Data Type:  ViPInt32 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_quesEvent_Q

Syntax:

ViStatus _VI_FUNC agN67xx_quesEvent_Q(ViSession instrumentHandle, ViInt16 channelNumber, ViPInt32 questionableEventRegister);

This function queries the Questionable Event register.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
questionableEventRegister	The value of the Questionable Event register. Data Type:  ViPInt32 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_readOutputStatus

Syntax:

ViStatus _VI_FUNC agN67xx_readOutputStatus(ViSession instrumentHandle, ViInt16 channelNumber, ViPInt16 outputStatus);

This function queries the channel's output status.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
outputStatus	The output status of the selected channel. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_readStatusByte_Q

Syntax:

ViStatus _VI_FUNC agN67xx_readStatusByte_Q(ViSession instrumentHandle, ViPInt16 statusByte);

This function queries the instrument’s Status Byte register.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
statusByte	The value of the Status Byte register. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_recallState

Syntax:

ViStatus _VI_FUNC agN67xx_recallState(ViSession instrumentHandle, ViInt16 index);

Restores the power system to a state that was previously stored in memory with a *SAV command to the specified location.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
index	The recall state location. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_reset

Syntax:

ViStatus _VI_FUNC agN67xx_reset(ViSession instrumentHandle);

The reset function places the instrument in a default state.

The following commands are sent to the instrument:

1. Device Clear -- to ensure that the instrument can execute a reset.

2. *RST -- reset the instrument to factory define state.  Also, abort any acquisition pending or in progress.

3. *CLS -- clear event and status registers, error queue, and the MAV status bit.

For a description of the reset state, consult the User’s Guide.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_resetOutputProtection

Syntax:

ViStatus _VI_FUNC agN67xx_resetOutputProtection(ViSession instrumentHandle, ViInt16 channelNumber);

This function clears the latch that disables the output when an Over--Voltage, Over--Current, Over--Temperature, Remote Inhibit, or Fuse Status condition is detected. All conditions that generate the fault must be removed before the latch can be cleared. The output is then restored to the state it was in before the fault condition occurred.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_revision_query

Syntax:

ViStatus _VI_FUNC agN67xx_revision_query(ViSession instrumentHandle, ViChar instrumentDriverRevision[ ], ViChar firmwareRevision[ ]);

This function returns the revision of the instrument driver and the firmware of the instrument being used.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
instrumentDriverRevision	The instrument driver revision.  This is limited to 256 characters. Data Type:  ViChar [ ] Input/Output:  OUT
firmwareRevision	The instrument firmware revision.  This is limited to 256 characters. Data Type:  ViChar [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_saveState

Syntax:

ViStatus _VI_FUNC agN67xx_saveState(ViSession instrumentHandle, ViInt16 index);

This function stores the present state of the power module to a specified location in memory.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
index	The save state location. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_self_test

Syntax:

ViStatus _VI_FUNC agN67xx_self_test(ViSession instrumentHandle, ViPInt16 testResult, ViChar testMessage[ ]);

The self--test function causes the instrument to perform a self--test and returns the result of that self--test.  This is used to verify that an instrument is operating properly.  A failure may indicate a potential hardware problem.

For a list of possible self--test errors, consult the User’s Guide.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
testResult	Numeric result from self--test operation. 0 = no error (test passed). Data Type:  ViPInt16 Input/Output:  OUT
testMessage	Self--test status message.  This is limited to 256 characters. Data Type:  ViChar [ ] Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_sendSoftwareTrigger

Syntax:

ViStatus _VI_FUNC agN67xx_sendSoftwareTrigger(ViSession instrumentHandle);

This function signals a subsystem to perform its action.  The subsystem must have been previously armed with the agN67xx_arm() function and the trigger source is set to BUS.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setAcqSenseFunc

Syntax:

ViStatus _VI_FUNC agN67xx_setAcqSenseFunc(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 senseFunction);

This function programs the sense function for the next triggered measurement.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
senseFunction	The measurement sense function:  voltage or current. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_VOLTAGE	0	VOLTAGE
	AGN67XX_CURRENT	1	CURRENT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setCurr

Syntax:

ViStatus _VI_FUNC agN67xx_setCurr(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 currParam, ViReal64 currLev);

This function directly programs the selected current parameter of the power supply.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
currParam	Specifies the current parameter to be programmed. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_CURR_IMM	0	Immediate Current Level
	AGN67XX_CURR_MAX	1	Maximum Current
	AGN67XX_CURR_MIN	2	Minimum Current
	AGN67XX_CURR_RANGE_MAX	3	Maximum Current Range
	AGN67XX_CURR_RANGE_MIN	4	Minimum Current Range
	AGN67XX_CURR_SENSE_RANGE_MAX	5	Max. Current Sense Range
	AGN67XX_CURR_SENSE_RANGE_MIN	6	Min. Current Sense Range
	AGN67XX_CURR_TRIG	7	Triggered Current
	AGN67XX_CURR_TRIG_MAX	8	Trigger Maximum Current
	AGN67XX_CURR_TRIG_MIN	9	Trigger Minimum Current
currLev	The current level to be programmed. You only need to program a value if the immediate current level or the triggered current parameter is selected.  Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setCurrAcqTrig

Syntax:

ViStatus _VI_FUNC agN67xx_setCurrAcqTrig(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 acqTrigSource);

This function sets the parameters of the acquisition trigger system.  The sense function is set to current acquisition. The acquisition trigger system is not enabled.  It must be armed with the agN67xx_arm() function before it can receive any acquisition trigger.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
acqTrigSource	The trigger source of the acquisition system. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_TRIGGER_SOURCE_BUS	0	BUS
	AGN67XX_TRIGGER_SOURCE_PIN1	1	PIN1
	AGN67XX_TRIGGER_SOURCE_PIN2	2	PIN2
	AGN67XX_TRIGGER_SOURCE_PIN3	3	PIN3
	AGN67XX_TRIGGER_SOURCE_PIN4	4	PIN4
	AGN67XX_TRIGGER_SOURCE_PIN5	5	PIN5
	AGN67XX_TRIGGER_SOURCE_PIN6	6	PIN6
	AGN67XX_TRIGGER_SOURCE_PIN7	7	PIN7
	AGN67XX_TRIGGER_SOURCE_TRAN1	8	TRAN1
	AGN67XX_TRIGGER_SOURCE_TRAN2	9	TRAN2
	AGN67XX_TRIGGER_SOURCE_TRAN3	10	TRAN3
	AGN67XX_TRIGGER_SOURCE_TRAN4	11	TRAN4

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setCurrSenseRange

Syntax:

ViStatus _VI_FUNC agN67xx_setCurrSenseRange(ViSession instrumentHandle, ViInt16 channelNumber, ViReal64 currSenseRange);

This function selects the current sense range on models that have multiple measurement ranges.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
currSenseRange	The value that specifies the current range. The value that you enter must be higher than the maximum current that you expect to measure. Units are in amperes. The instrument selects the range with the best resolution for the value entered. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setCurrentCompensate

Syntax:

ViStatus _VI_FUNC agN67xx_setCurrentCompensate(ViSession instrumentHandle, ViInt16 channelNumber, ViBoolean enabled);

This function enables/disables current compensation for the specified output channel.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
enabled	A boolean that indicates if current compensation is enabled or disabled. If VI_TRUE (1), compensation is enabled. If VI_FALSE (0), compensation is disabled. Data Type:  ViBoolean Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setDate

Syntax:

ViStatus _VI_FUNC agN67xx_setDate(ViSession instrumentHandle, ViInt16 year, ViInt16 month, ViInt16 day);

This function sets the date in the instrument.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
year	The year, a four-digit number. Data Type:  ViInt16 Input/Output:  IN
month	The month, from 1 to 12. Data Type:  ViInt16 Input/Output:  IN
day	The day, from 1 to 31. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setDigitalPort

Syntax:

ViStatus _VI_FUNC agN67xx_setDigitalPort(ViSession instrumentHandle, ViInt16 digitaldata);

This function Reads/Writes a data value to the digital port.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
digitaldata	The data value. This is a binary-weighted value that programs the digital pins according to the following bit assignments. Therefore the output value can range from 0 to 127. Pin #       Bit #      Decimal Value 1 0 1 2 1 2 3 2 4 4 3 8 5 4 16 6 5 32 7 6 64 8 N/A NA Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setEnableReg

Syntax:

ViStatus _VI_FUNC agN67xx_setEnableReg(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 enableRegister, ViInt16 enableMask);

This function sets the enable mask of the specified status register.  The mask specifies the events to be included in the summary status bit.  The summary status bit is used by the status byte register and the DFI source register.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
enableRegister	The status register to be enabled. The following status registers are defined: Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_REG_ESE	0	Standard Event Status
	AGN67XX_REG_SRE	1	Service Request
	AGN67XX_REG_OPER	2	Operation Status
	AGN67XX_REG_QUES	5	Questionable Status
enableMask	The mask for the selected register.  Refer to Programming the Status Registers for a definition of each status register bit.  A 1 in the mask enables the specified event. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setFourWireSense

Syntax:

ViStatus _VI_FUNC agN67xx_setFourWireSense(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 fourWireSenseType);

This function selects the four-wire sense function. The four wire sense function is also referred to as remote voltage sensing.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
fourWireSenseType	The four-wire sense type. Internal - sets the remote sense relays to local sensing. The front panel remote sense terminals are internally connected to the output terminals. External - sets the remote sense relays to remote sensing. The front panel remote sense terminals are enabled and must be connected to the external load. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_FOUR_WIRE_SENSE_INTERNAL	0	INTERNAL
	AGN67XX_FOUR_WIRE_SENSE_EXTERNAL	1	EXTERNAL

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setMeasTimeout

Syntax:

ViStatus _VI_FUNC agN67xx_setMeasTimeout(ViSession instrumentHandle, ViInt32 measTimeout);

This function sets the timeout for a measurement acquisition.  The timeout is used for terminating a measurement if the measurement trigger is not received or if the sweep parameter is improperly set.  The time required for a measurement acquisition is determined by the sweep size, the sample interval and the sweep offset.  If the timeout is too short for the acquisition, the measurement function will return with an AGN67XX_INSTR_ERROR_MEAS_TMO error status.

The measurement timeout applies to all measurement functions:

agN67xx_measureVolt() agN67xx_measureCurr() agN67xx_measureVoltArray() agN67xx_measureCurrArray() agN67xx_fetchVolt() agN67xx_fetchCurr() agN67xx_fetchVoltArray() agN67xx_fetchCurrArray()

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
measTimeout	The acquisition timeout value in milliseconds. Note: Although zero is a valid value, it is usually not suitable for most measurements. Use a reasonable timeout value. Data Type:  ViInt32 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setMeasure

Syntax:

ViStatus _VI_FUNC agN67xx_setMeasure(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 outputParam, ViReal64 outputLev, ViInt16 settlingTime, ViPReal64 voltQLevel, ViPReal64 currQLimit, ViPInt16 outputStatus);

This function sets the output voltage or the output current depending on the output parameter selection.  After the output level is set, the function measures the output voltage and current, and reads back the operating status.

Note:  This function reprograms the Status Registers when retrieving the measurement. Specifically, it programs the MAV bit to generate an SRQ (service request) signal when the measurement data is available. If you are using the service request signal in your application, you must reprogram the Service Request Enable register after the completion of this function.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
outputParam	Selects which output parameter to set:  voltage or current. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_VOLTAGE	0	Voltage
	AGN67XX_CURRENT	1	Current
outputLev	The output voltage or current level of the output channel. Data Type:  ViReal64 Input/Output:  IN
settlingTime	The time in milliseconds for the output to change and settle before measurements are made. Data Type:  ViInt16 Input/Output:  IN
voltQLevel	The voltage measured at the output of the output channel. Data Type:  ViPReal64 Input/Output:  OUT
currQLimit	The current measured at the output of the output channel. Data Type:  ViPReal64 Input/Output:  OUT
outputStatus	The output status of the output channel. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setMeasurementRange

Syntax:

ViStatus _VI_FUNC agN67xx_setMeasurementRange(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 measurementType, ViReal64 senseRange);

This function selects the measurement voltage and current range.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
measurementType	The measurement type:  voltage or current. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_CURRENT	1	Current
	AGN67XX_VOLTAGE	0	Voltage
senseRange	The measurement range. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setMeasurementTrigSource

Syntax:

ViStatus _VI_FUNC agN67xx_setMeasurementTrigSource(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 triggerSource);

This functions selects the trigger source for a measurement trigger. Only applies to models with digitizing capability.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
triggerSource	The trigger source of the acquisition system. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_TRIGGER_SOURCE_BUS	0	BUS
	AGN67XX_TRIGGER_SOURCE_PIN1	1	PIN1
	AGN67XX_TRIGGER_SOURCE_PIN2	2	PIN2
	AGN67XX_TRIGGER_SOURCE_PIN3	3	PIN3
	AGN67XX_TRIGGER_SOURCE_PIN4	4	PIN4
	AGN67XX_TRIGGER_SOURCE_PIN5	5	PIN5
	AGN67XX_TRIGGER_SOURCE_PIN6	6	PIN6
	AGN67XX_TRIGGER_SOURCE_PIN7	7	PIN7
	AGN67XX_TRIGGER_SOURCE_TRAN1	8	TRAN1
	AGN67XX_TRIGGER_SOURCE_TRAN2	9	TRAN2
	AGN67XX_TRIGGER_SOURCE_TRAN3	10	TRAN3
	AGN67XX_TRIGGER_SOURCE_TRAN4	11	TRAN4

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setMeasurementWindow

Syntax:

ViStatus _VI_FUNC agN67xx_setMeasurementWindow(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 windowType);

This function sets the window function that is used in output measurement calculations. Only applies to models with digitizing capability.

Note: Neither window function alters the instantaneous voltage or current data returned in the measurement array.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
windowType	Select from the following window functions: The Hanning window.  A signal conditioning window that reduces errors in dc and rms measurement calculation in the presence of periodic signals such as line ripple. It also reduces jitter when measuring successive pulse waveforms.  The Hanning window multiplies each point in the measurement sample by the function cos()**4.  Do not use the Hanning window when measuring single--shot pulse waveforms. The Rectangular window.  A window that returns measurement calculation without any signal conditioning.  This window may be used for pulse measurements where the exact period of the pulse waveform is known and the measurement interval can be set accordingly using the setMeasurementWindow function. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_WINDOW_RECTANGULAR	0	Rectangular
	AGN67XX_WINDOW_HANNING	1	Hanning

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setOcpParams

Syntax:

ViStatus _VI_FUNC agN67xx_setOcpParams(ViSession instrumentHandle, ViInt16 channelNumber, ViBoolean ocpEnable, ViReal64 ccDelay);

This function sets the over--current protection parameters of the output channel.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
ocpEnable	This parameter enables/disables the over-current protection (OCP) function. Data Type:  ViBoolean Input/Output:  IN
	Values:
	Name	Value	Description
	VI_TRUE	(1)	Enabled
	VI_FALSE	(0)	Disabled
ccDelay	The time delay before a Constant Current condition is recognized. Values can range from 0 to 255 milliseconds. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setOutpTrigSource

Syntax:

ViStatus _VI_FUNC agN67xx_setOutpTrigSource(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 outpTrigSource);

This function sets the trigger source setting of the output subsystem.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
outpTrigSource	The trigger source of the acquisition system. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_TRIGGER_SOURCE_BUS	0	BUS
	AGN67XX_TRIGGER_SOURCE_PIN1	1	PIN1
	AGN67XX_TRIGGER_SOURCE_PIN2	2	PIN2
	AGN67XX_TRIGGER_SOURCE_PIN3	3	PIN3
	AGN67XX_TRIGGER_SOURCE_PIN4	4	PIN4
	AGN67XX_TRIGGER_SOURCE_PIN5	5	PIN5
	AGN67XX_TRIGGER_SOURCE_PIN6	6	PIN6
	AGN67XX_TRIGGER_SOURCE_PIN7	7	PIN7
	AGN67XX_TRIGGER_SOURCE_TRAN1	8	TRAN1
	AGN67XX_TRIGGER_SOURCE_TRAN2	9	TRAN2
	AGN67XX_TRIGGER_SOURCE_TRAN3	10	TRAN3
	AGN67XX_TRIGGER_SOURCE_TRAN4	11	TRAN4

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setOutputCoupleChannels

Syntax:

ViStatus _VI_FUNC agN67xx_setOutputCoupleChannels(ViSession instrumentHandle, ViString channels);

This function specifies which output channels are coupled.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channels	The output channels that will be coupled. This is a comma seperated list of channels in the format n[,n[,n[,n]]]. For example, to couple channels 1, 2, and 3, pass in 1,2,3. Ranges like 1:3 are not allowed. Data Type:  ViString Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setOutputCoupleDelayOffset

Syntax:

ViStatus _VI_FUNC agN67xx_setOutputCoupleDelayOffset(ViSession instrumentHandle, ViReal64 delayOffset);

This function configures the output coupling delay offset.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
delayOffset	The delay offset in seconds.Values range form 0 to 1.023. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setOutputCoupleDelayOffsetMode

Syntax:

ViStatus _VI_FUNC agN67xx_setOutputCoupleDelayOffsetMode(ViSession instrumentHandle, ViInt16 outputCoupleOffsetModeType);

This function selects the output coupling delay offset mode.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
outputCoupleOffsetModeType	The output coupling delay offset mode: Auto or Manual. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_OUTPUT_COUPLE_DELAY_OFFSET_MODE_AUTO	0	Auto mode
	AGN67XX_OUTPUT_COUPLE_DELAY_OFFSET_MODE_MANUAL	1	Manual mode

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setOutputCoupleEnabled

Syntax:

ViStatus _VI_FUNC agN67xx_setOutputCoupleEnabled(ViSession instrumentHandle, ViBoolean enabled);

This function enables or disables output coupling or synchronization between multiple output channels.

When output channels have been coupled and the Digital connector pins have been properly configured, enabling this function allows you to control the output state of multiple outputs in multiple mainframes by controlling the output state of one output channel. Refer to Appendix D in the N6700 User's Guide for detailed information.queries the state of the output coupling function.

This function is always enabled on Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
enabled	A boolean that indicates if output coupling is enabled or disabled. If VI_TRUE (1), output coupling is enabled. If VI_FALSE (0), output coupling is disabled. Data Type:  ViBoolean Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setOutputEnabled

Syntax:

ViStatus _VI_FUNC agN67xx_setOutputEnabled(ViSession instrumentHandle, ViInt16 channelNumber, ViBoolean enabled);

This function enables/disables the selected output channel.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
enabled	A boolean which enables/disables the selected output channel. If VI_TRUE (1), the output channel is enabled. If VI_FALSE (0), the output channel is disabled. Data Type:  ViBoolean Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setOutputGroup

Syntax:

ViStatus _VI_FUNC agN67xx_setOutputGroup(ViSession instrumentHandle, ViInt16 groupMode);

This function configures output channels into groups of paralleled channels. This effectively creates a single output with higher current and power capability. Grouped channels are addressed using the channel number of the lowest channel in the group

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
groupMode	The output group mode. The following values define which channels are grouped when the function is executed. Note that the last three values define TWO groups consisting of two channels in each group. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_OUTPUT_NO_GROUP	0	No_groups
	AGN67XX_OUTPUT_GROUP_1234	1	channels 1,2,3,4
	AGN67XX_OUTPUT_GROUP_123	2	channels 1,2,3
	AGN67XX_OUTPUT_GROUP_124	3	channels 1,2,4
	AGN67XX_OUTPUT_GROUP_134	4	channels 1,3,4
	AGN67XX_OUTPUT_GROUP_234	5	channels 2,3,4
	AGN67XX_OUTPUT_GROUP_12	6	channels 1,2
	AGN67XX_OUTPUT_GROUP_13	7	channels 1,3
	AGN67XX_OUTPUT_GROUP_14	8	channels 1,4
	AGN67XX_OUTPUT_GROUP_23	9	channels 2,3
	AGN67XX_OUTPUT_GROUP_24	10	channels 2,4
	AGN67XX_OUTPUT_GROUP_34	11	channels 3,4
	AGN67XX_OUTPUT_GROUP_12_34	12	channels 1,2 and 3,4
	AGN67XX_OUTPUT_GROUP_13_24	13	channels 1,3 and 2,4
	AGN67XX_OUTPUT_GROUP_14_23	14	channels 1,4 and 2,3

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setOutputInhibitMode

Syntax:

ViStatus _VI_FUNC agN67xx_setOutputInhibitMode(ViSession instrumentHandle, ViInt16 inhibitMode);

Selects the mode of operation of the Inhibit input (INH). The inhibit function shuts down ALL outputs in response to an external signal on the inhibit input located on the back of the mainframe.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
inhibitMode	Specifies the inhibit mode setting. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_INHIBIT_MODE_OFF	0	Off
	AGN67XX_INHIBIT_MODE_LIVE	1	Live
	AGN67XX_INHIBIT_MODE_LATCH	2	Latch

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setOutputState

Syntax:

ViStatus _VI_FUNC agN67xx_setOutputState(ViSession instrumentHandle, ViInt16 channelNumber, ViBoolean outputState, ViBoolean switchRelay);

This function enables or disables the output of the selected output channel. The state of the disabled outputs is a condition of zero output voltage and current at the output terminals.

This function also controls the Option 761 output relay.  The Switch Relay parameter specifies if the output relay is also changed.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
outputState	A boolean that enables/disables the selected output channel. If VI_TRUE (1), the output channel is enabled. If VI_FALSE (0), the output channel is disabled. Data Type:  ViBoolean Input/Output:  IN
	Values:
	Name	Value	Description
	VI_TRUE	(1)	Enabled
	VI_FALSE	(0)	Disabled
switchRelay	A boolean that specifies whether the output relays are switched along with the output state of the channel. If VI_TRUE (1), the output relays are switched along with the output. If VI_FALSE (0), the output relay are not switched with the output. Data Type:  ViBoolean Input/Output:  IN
	Values:
	Name	Value	Description
	VI_TRUE	(1)	Switched
	VI_FALSE	(0)	Not switched

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setPowerLimit

Syntax:

ViStatus _VI_FUNC agN67xx_setPowerLimit(ViSession instrumentHandle, ViInt16 channelNumber, ViReal64 powerLimit);

This function sets the power limit of the selected output channel.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
powerLimit	The power limit of the selected channel. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setPowerLimitMax

Syntax:

ViStatus _VI_FUNC agN67xx_setPowerLimitMax(ViSession instrumentHandle, ViInt16 channelNumber);

This function sets the selected output channel to its maximum rated power limit. When an output channel's power limit is set to maximum, the power limit function will not activate.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setPowerOnState

Syntax:

ViStatus _VI_FUNC agN67xx_setPowerOnState(ViSession instrumentHandle, ViInt16 powerOnState);

This function selects the power--on state of the instrument. This information is saved in non--volatile memory.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
powerOnState	Specifies the power--on state of the instrument as follows: *RST -- Sets the power--on state to *RST. Refer to the *RST command in chapter 4 of the Programming Guide for information on the reset state of all programmable parameters. RCL0 -- Sets the power--on state to *RCL 0. This is the state stored in memory location 0 of the instrument. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_PON_STATE_RST	0	*RST
	AGN67XX_PON_STATE_RCL0	1	RCL0

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setProtectionCoupleFaults

Syntax:

ViStatus _VI_FUNC agN67xx_setProtectionCoupleFaults(ViSession instrumentHandle, ViBoolean coupleFault);

This function enables/disables channel-coupling for output protection faults. When coupled, an output protection fault on one channel will shut down all channels.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
coupleFault	A boolean that specifies whether the output channels are coupled for output protection faults. If VI_TRUE (1), the output channels are coupled. If VI_FALSE (0), the output channels are not coupled. Data Type:  ViBoolean Input/Output:  IN
	Values:
	Name	Value	Description
	VI_TRUE	(1)	Coupled
	VI_FALSE	(0)	Not coupled

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setProtectionOCPDelay

Syntax:

ViStatus _VI_FUNC agN67xx_setProtectionOCPDelay(ViSession instrumentHandle, ViInt16 channelNumber, ViReal64 OCPDelay);

This function sets the over--current protection programming delay.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
OCPDelay	The over-current protection delay. The over-current protection is based on the state of the constant current status bit.  The delay prevents the momentary changes in the constant current status bit that can occur during output transients from being registered as events by the status subsystem. Note: The state of the constant current status bit is ignored if OCP is disabled. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setProtectionOVPLimit

Syntax:

ViStatus _VI_FUNC agN67xx_setProtectionOVPLimit(ViSession instrumentHandle, ViInt16 channelNumber, ViReal64 OVPLimit);

This function specifies the over-voltage protection limit. The units are Volts.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
OVPLimit	The over-voltage protection limit. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setRegister

Syntax:

ViStatus _VI_FUNC agN67xx_setRegister(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 register, ViInt16 subRegister, ViInt16 value);

This function specifies the binary--weighted value to program the selected register.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
register	The status register. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_REGISTER_STATUS_BYTE	0	Status Byte
	AGN67XX_REGISTER_STANDARD_EVENT	1	Standard Event
	AGN67XX_REGISTER_OPERATION	2	Operation
	AGN67XX_REGISTER_QUESTIONABLE	3	Questionable
subRegister	The subregister. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_SUB_REGISTER_CONDITION	0	Condition
	AGN67XX_SUB_REG_NEG_TRANSITION	1	Negative
	AGN67XX_SUB_REG_POS_TRANSITION	2	Positive
	AGN67XX_SUB_REGISTER_EVENT	3	Event
	AGN67XX_SUB_REGISTER_ENABLE	4	Enable
value	The value to set the selected register.  Refer to Programming the Status Registers for a definition of each status register bit. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setRelayPolarity

Syntax:

ViStatus _VI_FUNC agN67xx_setRelayPolarity(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 polarityType);

This function switches the output terminal polarity. It is only valid for units with Option 761, otherwise an error will occur. Polarity reversal affects both the output and the sense terminals. Note that this command briefly turns the output off while the output and the sense terminal polarities are switched.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
polarityType	The polarity type.  Normal causes the output polarity to be the same as the output connector labeling.  Reversed causes the output polarity to be the reverse of the output connector labeling. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_RELAY_POLARITY_NORMAL	0	NORMAL
	AGN67XX_RELAY_POLARITY_REVERSED	1	REVERSED

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setSweepParams

Syntax:

ViStatus _VI_FUNC agN67xx_setSweepParams(ViSession instrumentHandle, ViInt16 channelNumber, ViReal64 sampleInterval, ViInt32 sweepSize, ViInt32 sweepOffset);

This function sets the sweep parameters of a waveform measurement acquisition. Only applies to models with digitizing capability.

DC voltage and current are measured by acquiring a number of readings at a specified time interval. Ripple rejection is a function of the number of cycles of the ripple frequency contained in the acquisition window.  More cycles in the acquisition window results in better ripple rejection.  Increasing the sample interval will increase the number of cycles in the acquisition, but it also increases the acquisition time.

The speed of the acquisition can be increased by reducing the number of sample points.  However, the tradeoff is reduced measurement accuracy.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
sampleInterval	The time interval between samples in seconds. The range is from 0.00002048 seconds to 40,000 seconds. Data Type:  ViReal64 Input/Output:  IN
sweepSize	The number of points in an acquisition. Data Type:  ViInt32 Input/Output:  IN
	Values:
	Sweep Size min.	1
	Sweep Size max.	4096
sweepOffset	The offset of the beginning of the acquisition buffer relative to the acquisition trigger. Data Type:  ViInt32 Input/Output:  IN
	Values:
	Sweep Offset min.	--4095
	Sweep Offset max.	2000000000

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setTime

Syntax:

ViStatus _VI_FUNC agN67xx_setTime(ViSession instrumentHandle, ViInt16 hour, ViInt16 minute, ViInt16 second);

This function sets the time in the instrument.

Only applies to Agilent N6705A DC Power Analyzer.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
hour	The hour, from 0 to 23. Data Type:  ViInt16 Input/Output:  IN
minute	The minute, from 0 to 59. Data Type:  ViInt16 Input/Output:  IN
second	The second, from 0 to 59. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()

agN67xx_setTime

      ViStatus agN67xx_setTime (ViSession instrumentHandle, ViInt16 hour, ViInt16 minute, ViInt16 second);

Parameter List

      instrumentHandle

          Variable Type       ViSession

          The instrument's VISA session handle returned from agN67xx_init().

      hour

          Variable Type       ViInt16

          Hour

      minute

          Variable Type       ViInt16

          Minute

      second

          Variable Type       ViInt16

          Second

Return Value

          The meaning of the VISA status returned by the function is as follows:

           = 0  "VI_SUCCESS"    The function completed successfully.

           > 0  Warning         The function completed, but an

                                exceptional condition occurred which

                                may require attention.

           < 0  Error           The function did not complete

                                successfully.

          Use the agN67xx_error_message() function to get a textual description of errors and

          warnings.


agN67xx_setTransientStepTrigLevel

Syntax:

ViStatus _VI_FUNC agN67xx_setTransientStepTrigLevel(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 triggerLevelType, ViReal64 triggerlevel);

This function sets the voltage or current trigger level. It also sets the current and voltage mode to Step.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
triggerLevelType	The trigger level type: voltage or current. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_CURRENT	1	Current
	AGN67XX_VOLTAGE	0	Voltage
triggerlevel	The trigger level. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setTransientStepTrigOut

Syntax:

ViStatus _VI_FUNC agN67xx_setTransientStepTrigOut(ViSession instrumentHandle, ViInt16 channelNumber, ViBoolean stepTrigOut);

This function enables/disables triggers on the voltage or current step.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
StepTrigOut	A boolean that enables/disables triggers on output steps. If VI_TRUE (1), triggers are enabled. If VI_FALSE (0), triggers are disabled. Data Type:  ViBoolean Input/Output:  IN
	Values:
	Name	Value	Description
	VI_TRUE	(1)	Enabled
	VI_FALSE	(0)	Disabled

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setTransientTrigSource

Syntax:

ViStatus _VI_FUNC agN67xx_setTransientTrigSource(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 triggerSource);

This function selects the transient trigger source.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
triggerSource	The transient trigger source. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_TRIGGER_SOURCE_BUS	0	BUS
	AGN67XX_TRIGGER_SOURCE_PIN1	1	PIN1
	AGN67XX_TRIGGER_SOURCE_PIN2	2	PIN2
	AGN67XX_TRIGGER_SOURCE_PIN3	3	PIN3
	AGN67XX_TRIGGER_SOURCE_PIN4	4	PIN4
	AGN67XX_TRIGGER_SOURCE_PIN5	5	PIN5
	AGN67XX_TRIGGER_SOURCE_PIN6	6	PIN6
	AGN67XX_TRIGGER_SOURCE_PIN7	7	PIN7
	AGN67XX_TRIGGER_SOURCE_TRAN1	8	TRAN1
	AGN67XX_TRIGGER_SOURCE_TRAN2	9	TRAN2
	AGN67XX_TRIGGER_SOURCE_TRAN3	10	TRAN3
	AGN67XX_TRIGGER_SOURCE_TRAN4	11	TRAN4

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setTriggerMode

Syntax:

ViStatus _VI_FUNC agN67xx_setTriggerMode(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 triggerFunction, ViInt16 triggerMode);

This function selects the output mode that will respond to triggers. It also selects how the output responds when the trigger system is initiated and triggered.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
triggerFunction	The trigger function: voltage or current. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_CURRENT	1	Current
	AGN67XX_VOLTAGE	0	Voltage
triggerMode	Specifies the output response to triggers as follows: Fixed -- The output remains at the immediate value when a trigger is received (the trigger is ignored). Step -- The output goes to the triggered level when a trigger is received. List -- The output follows the programmed list step value when a trigger is received. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_MODE_FIXED	0	Fixed
	AGN67XX_MODE_STEP	1	Step
	AGN67XX_MODE_LIST	2	List

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setVolt

Syntax:

ViStatus _VI_FUNC agN67xx_setVolt(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 voltParam, ViReal64 voltLev);

This function directly programs the selected voltage parameter of the output channel.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
voltParam	Specifies the voltage parameter to be programmed. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_VOLT_IMM	0	Immediate Voltage Level
	AGN67XX_VOLT_MAX	1	Maximum Voltage Level
	AGN67XX_VOLT_MIN	2	Minimum Voltage Level
	AGN67XX_VOLT_OVP	3	OVP Level
	AGN67XX_VOLT_OVP_MAX	4	Maximum OVP Level
	AGN67XX_VOLT_OVP_MIN	5	Minimum OVP Level
	AGN67XX_VOLT_RANGE_MAX	6	Maximum Voltage Range
	AGN67XX_VOLT_RANGE_MIN	7	Minimum Voltage Range
	AGN67XX_VOLT_SENSE_RANGE_MAX	8	Max. Voltage Sense Range
	AGN67XX_VOLT_SENSE_RANGE_MIN	9	Min. Voltage Sense Range
	AGN67XX_VOLT_TRIG	10	Triggered Voltage Level
	AGN67XX_VOLT_TRIG_MAX	11	Triggered Maximum Voltage
	AGN67XX_VOLT_TRIG_MIN	12	Triggered Minimum Voltage
voltLev	The voltage level to be programmed.You only need to program a value if the immediate voltage level, the OVP level  or the triggered voltage parameter is selected.  Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setVoltAcqTrig

Syntax:

ViStatus _VI_FUNC agN67xx_setVoltAcqTrig(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 acqTrigSource);

This function sets the parameters of the voltage acquisition trigger system.  The sense function is set to voltage acquisition. The acquisition trigger system is not armed.  It must be armed with the agN67xx_arm() function before it can receive any acquisition trigger.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
acqTrigSource	The trigger source of the acquisition system. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_TRIGGER_SOURCE_BUS	0	BUS
	AGN67XX_TRIGGER_SOURCE_PIN1	1	PIN1
	AGN67XX_TRIGGER_SOURCE_PIN2	2	PIN2
	AGN67XX_TRIGGER_SOURCE_PIN3	3	PIN3
	AGN67XX_TRIGGER_SOURCE_PIN4	4	PIN4
	AGN67XX_TRIGGER_SOURCE_PIN5	5	PIN5
	AGN67XX_TRIGGER_SOURCE_PIN6	6	PIN6
	AGN67XX_TRIGGER_SOURCE_PIN7	7	PIN7
	AGN67XX_TRIGGER_SOURCE_TRAN1	8	TRAN1
	AGN67XX_TRIGGER_SOURCE_TRAN2	9	TRAN2
	AGN67XX_TRIGGER_SOURCE_TRAN3	10	TRAN3
	AGN67XX_TRIGGER_SOURCE_TRAN4	11	TRAN4

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setVoltSenseRange

Syntax:

ViStatus _VI_FUNC agN67xx_setVoltSenseRange(ViSession instrumentHandle, ViInt16 channelNumber, ViReal64 voltSenseRange);

This function selects the voltage sense range on models that have multiple measurement ranges.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
VoltSenseRange	The value that specifies the voltage range. The value that you enter must be higher than the maximum voltage that you expect to measure. Units are in volts. The instrument selects the range with the best resolution for the value entered.. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_setVoltageSlewRate

Syntax:

ViStatus _VI_FUNC agN67xx_setVoltageSlewRate(ViSession instrumentHandle, ViInt16 channelNumber, ViReal64 slewRate);

This function sets the voltage slew rate in volts per second. The slew rate setting affects all programmed voltage changes, including those due to the output state turning on or off. The slew rate can be set to any value between 0 and 9.9E37.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
slewRate	The voltage slew rate. Data Type:  ViReal64 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_statusClear

Syntax:

ViStatus _VI_FUNC agN67xx_statusClear(ViSession instrumentHandle);

This function clears all event registers and error queue. The enable registers are unaffected.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_statusPreset

Syntax:

ViStatus _VI_FUNC agN67xx_statusPreset(ViSession instrumentHandle);

This function presets all enable and transition registers to their power--on state.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_stdEvent_Q

Syntax:

ViStatus _VI_FUNC agN67xx_stdEvent_Q(ViSession instrumentHandle, ViPInt16 standardEventStatus);

This function queries the Standard Event Status register.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
standardEventStatus	The value of the Standard Event Status register. Data Type:  ViPInt16 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_timeOut

Syntax:

ViStatus _VI_FUNC agN67xx_timeOut(ViSession instrumentHandle, ViInt32 timeOut);

The timeout function sets the timeout value for driver I/O transactions in milliseconds. The timeout period may vary on computer platforms.

The default timeout period varies by VISA implementation.  For Agilent VISA, it is 2 seconds.

Some implementations of VISA will only accept a limited number of timeout values.  If you set the VISA timeout to a given value using one of those implementations, and then query the timeout, you may find that the query returns a different value than the one you set.  Agilent VISA sets the timeout to the precise value you specify, and returns that value when queried.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
timeOut	This value sets the I/O timeout for all functions in the driver. It is specified in milliseconds. Data Type:  ViInt32 Input/Output:  IN
	Values:
	Time Out min.	0
	Time Out max.	2147483647

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_timeOut_Q

Syntax:

ViStatus _VI_FUNC agN67xx_timeOut_Q(ViSession instrumentHandle, ViPInt32 timeOut);

The timeout query function returns the timeout value for driver I/O transactions in milliseconds.  The timeout period may vary on computer platforms.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
timeOut	This value sets the I/O timeout for all functions in the driver. It is specified in milliseconds. Data Type:  ViPInt32 Input/Output:  OUT

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_transientListConfigure

Syntax:

ViStatus _VI_FUNC agN67xx_transientListConfigure(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 pace, ViBoolean termination, ViInt16 repeat, ViBoolean infiniteRepeat);

This function configures the list pace, termination mode, and repeat count. It also sets the current and voltage mode to List.  Only applies to models with list capability.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
pace	Selects the list pace mode as follows: Auto -- Causes the output to automatically advance to the next step after the receipt of an initial starting trigger. The steps are paced by the dwell list. Once -- Causes the output to remain at the present step until a trigger advances it to the next step. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_LIST_PACE_AUTO	0	Auto
	AGN67XX_LIST_PACE_ONCE	1	Once
termination	A boolean that determines the output value when the list terminates. If VI_TRUE (1), the output voltage or current remains at the value of the last list step. If VI_FALSE (0), the output voltage or current returns to the settings in effect before the list started. Data Type:  ViBoolean Input/Output:  IN
	Values:
	Name	Value	Description
	VI_TRUE	(1)	Close
	VI_FALSE	(0)	Open
repeat	Select the number of times the list repeats. Repeat will not allow a value greater than 256. Data Type:  ViInt16 Input/Output:  IN
infiniteRepeat	Repeats the list indefinitely. If this parameter is true, the repeat parameter is ignored.   Data Type:  ViBoolean Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_transientListPoints

Syntax:

ViStatus _VI_FUNC agN67xx_transientListPoints(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 numberPoints, ViReal64 voltArray[ ], ViReal64 currArray[ ], ViReal64 dwellArray[ ]);

This function programs the current, voltage, and dwell lists. It also sets the current and voltage mode to List.  Only applies to models with list capability.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
numberPoints	The number of points in the list. Data Type:  ViInt16 Input/Output:  IN
voltArray	The voltage array that contains the list data. The array size must match the number of points in the list. Data Type:  ViReal64 [ ] Input/Output:  IN
currArray	The current array that contains the list data. The array size must match the number of points in the list. Data Type:  ViReal64 [ ] Input/Output:  IN
dwellArray	The dwell array that contains the list data. The array size must match the number of points in the list. Data Type:  ViReal64 [ ] Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_transientListTrigOutPoints

Syntax:

ViStatus _VI_FUNC agN67xx_transientListTrigOutPoints(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 numberPoints, ViBoolean BOSArray[ ], ViBoolean EOSArray[ ]);

This function selects the list steps that have triggers at the beginning or the end of each list step. It also sets the current and voltage mode to List. Only applies to models with list capability.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
numberPoints	The number of points in the list. Data Type:  ViInt16 Input/Output:  IN
BOSArray	The Beginning of Step array that contains the trigger out data for each corresponding list step. A value of 1 generates a trigger; a value of 0 does not generate a trigger.  The array size must match the number of points in the list. Data Type:  ViBoolean [ ] Input/Output:  IN
EOSArray	The End of Step array that contains the trigger out data for each corresponding list step. A value of 1 generates a trigger; a value of 0 does not generate a trigger.  The array size must match the number of points in the list. Data Type:  ViBoolean [ ] Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_transientTrigAbort

Syntax:

ViStatus _VI_FUNC agN67xx_transientTrigAbort(ViSession instrumentHandle, ViInt16 channelNumber);

This function cancels any transient trigger actions presently in process. It returns the transient trigger system to the Idle state and resets the WTG--tran bit in the Operation Condition Status register.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_transientTrigImmediate

Syntax:

ViStatus _VI_FUNC agN67xx_transientTrigImmediate(ViSession instrumentHandle, ViInt16 channelNumber);

This function triggers the output immediately.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_transientTrigInitiate

Syntax:

ViStatus _VI_FUNC agN67xx_transientTrigInitiate(ViSession instrumentHandle, ViInt16 channelNumber);

This function initiates the transient trigger system. When the trigger system is initiated, a trigger causes the output to go to its triggered level. If the trigger system is not initiated, all trigger commands are ignored.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_trg

Syntax:

ViStatus _VI_FUNC agN67xx_trg(ViSession instrumentHandle);

This function sends an IEEE Group Execute Trigger (GET or *TRG) to the instrument.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


agN67xx_trigger

Syntax:

ViStatus _VI_FUNC agN67xx_trigger(ViSession instrumentHandle, ViInt16 channelNumber, ViInt16 subSystem);

This function triggers a subsystem to perform its action. The subsystem must have been previously armed with the agN67xx_arm() function and the trigger source is set to BUS.

Parameter	Description
instrumentHandle	The instrument's VISA session handle returned from agN67xx_init(). Data Type:  ViSession Input/Output:  IN
channelNumber	The channel parameter selection. Data Type:  ViInt16 Input/Output:  IN
subSystem	The subsystem to trigger.  There are two subsystems that can be triggered in the instrument -- transient and measurement. Data Type:  ViInt16 Input/Output:  IN
	Values:
	Name	Value	Description
	AGN67XX_TRIG_TRANSIENT	1	Transient
	AGN67XX_TRIG_MEASUREMENT	0	Measurement

Return Value:

VI_SUCCESS: No error

Non VI_SUCCESS: Indicates error condition. To determine error message, pass the return value to routine agN67xx_error_message()


close
Terminate the software connection to the instrument.


cmd
Passes a string to the instrument.


cmdInt
Passes a SCPI command string followed by a space and an integer value to the instrument.


cmdInt16Arr_Q
Passes a SCPI command string to the instrument.  This command returns a response of an array of 16-bit integers.


cmdInt16_Q
Passes a SCPI command string to the instrument and waits for a 16-bit integer response.


cmdInt32Arr_Q
Passes a SCPI command string to the instrument.  This command returns a response of an array of 32-bit integers.


cmdInt32_Q
Passes a SCPI command string to the instrument. This command expects a response that can be returned as a 32-bit integer.


cmdReal
Passes a SCPI command string followed by a space and a real value to the instrument.


cmdReal32Arr_Q
Passes a SCPI command string to the instrument.  This command returns a response of an array of 32-bit reals.


cmdReal32_Q
Passes a SCPI command string to the instrument.  This command returns a 32-bit real response.


cmdReal64Arr_Q
Passes a SCPI command string to the instrument.  This command returns a response of an array of 64-bit reals.


cmdReal64_Q
Passes a SCPI command string to the instrument. This command expects a response that can be returned as a 64-bit real number.


cmdString_Q
Passes a SCPI command string to the instrument. This function will wait for a response which must be a string (character data). A maximum of size-1 bytes will be read from the instrument and the string is NULL terminated.


dcl
Sends a device clear to the instrument.


errorQueryDetect
Enables or disables automatic instrument error checking.


errorQueryDetect_Q
Determines if automatic instrument error detection is enabled or disabled.


error_message
Translates the error value returned by a function to text description of the error.


error_query
Returns the error numbers and corresponding error messages in the error queue of an instrument.


init
Initializes the software connection to the instrument.


opc_Q
Queries the instrument and waits for previous command completion.


operCond_Q
Queries the operation condition register.


operEvent_Q
Queries the questionable event register.


quesCond_Q
Queries the questionable condition register.


quesEvent_Q
Queries the questionable event register.


readStatusByte_Q
Reads the instrument status byte.


reset
Places the instrument in the default state.


revision_query
Queries the revision level of the instrument driver and instrument firmware.


self_test
Performs an instrument self test and returns the results.


timeOut
Sets the I/O timeout interval.


timeOut_Q
Returns the I/O timeout interval.